Fix clippy warnings

This commit is contained in:
Dheepak Krishnamurthy 2021-08-13 22:19:37 -06:00
parent 3382c1f7ad
commit 5a4434ac58
4 changed files with 8 additions and 8 deletions

View file

@ -1500,7 +1500,7 @@ impl TaskwarriorTuiApp {
let shell = self.command.as_str();
match shlex::split(&shell) {
match shlex::split(shell) {
Some(cmd) => {
// first argument must be a binary
let mut command = Command::new(&cmd[0]);
@ -1532,7 +1532,7 @@ impl TaskwarriorTuiApp {
let shell = self.command.as_str();
match shlex::split(&shell) {
match shlex::split(shell) {
Some(cmd) => {
for s in cmd {
command.arg(&s);
@ -1661,7 +1661,7 @@ impl TaskwarriorTuiApp {
let shell = self.modify.as_str();
let r = match shlex::split(&shell) {
let r = match shlex::split(shell) {
Some(cmd) => {
for s in cmd {
command.arg(&s);
@ -1712,7 +1712,7 @@ impl TaskwarriorTuiApp {
let shell = self.command.as_str();
let r = match shlex::split(&shell) {
let r = match shlex::split(shell) {
Some(cmd) => {
for s in cmd {
command.arg(&s);
@ -1754,7 +1754,7 @@ impl TaskwarriorTuiApp {
let shell = self.command.as_str();
match shlex::split(&shell) {
match shlex::split(shell) {
Some(cmd) => {
for s in cmd {
command.arg(&s);

View file

@ -189,7 +189,7 @@ impl Config {
let attribute = i.next();
let line = i.collect::<Vec<_>>().join(" ");
let line = line.trim_start_matches(' ');
let tcolor = Self::get_tcolor(&line);
let tcolor = Self::get_tcolor(line);
if let Some(attr) = attribute {
color_collection.insert(attr.to_string(), tcolor);
};

View file

@ -418,7 +418,7 @@ where
let s = self.unmark_symbol.unwrap_or(" ").trim_end();
format!("{} ", s)
}
TableMode::SingleSelection => iter::repeat(" ").take(highlight_symbol.width()).collect::<String>(),
TableMode::SingleSelection => " ".repeat(highlight_symbol.width()),
};
let mark_highlight_symbol = {

View file

@ -159,7 +159,7 @@ impl TaskReportTable {
}
let mut item = vec![];
for name in &self.columns {
let s = self.get_string_attribute(name, &task, tasks);
let s = self.get_string_attribute(name, task, tasks);
item.push(s);
}
self.tasks.push(item)