From e7d33c6749ae69d521f84e6d877bd4e94ce1bdf0 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sun, 2 Aug 2020 12:34:39 -0600 Subject: [PATCH] Autoformat changes --- src/app.rs | 36 +++++++++++++++++++++--------------- src/color.rs | 1 - 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/app.rs b/src/app.rs index e4a54f0..e88bde6 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,4 +1,4 @@ -use crate::color::{TColor}; +use crate::color::TColor; use std::cmp::Ordering; use std::convert::TryInto; @@ -369,20 +369,26 @@ impl TTApp { let ctasks = self.tasks.clone(); let blocking = self.colors.blocking; let blocked = self.colors.blocked; - let rows = tasks - .iter() - .enumerate() - .map(|(i, val)| - if ctasks[i].tags().unwrap_or(&vec![]).join(" ").contains(&"BLOCKED".to_string()) { - Row::StyledData(val.iter(), normal_style) - } else if ctasks[i].tags().unwrap_or(&vec![]).contains(&"BLOCKING".to_string()) { - Row::StyledData(val.iter(), normal_style.fg(blocking)) - } else if ctasks[i].due().is_some() { - Row::StyledData(val.iter(), normal_style) - } else { - Row::StyledData(val.iter(), normal_style) - } - ); + let rows = tasks.iter().enumerate().map(|(i, val)| { + if ctasks[i] + .tags() + .unwrap_or(&vec![]) + .join(" ") + .contains(&"BLOCKED".to_string()) + { + Row::StyledData(val.iter(), normal_style) + } else if ctasks[i] + .tags() + .unwrap_or(&vec![]) + .contains(&"BLOCKING".to_string()) + { + Row::StyledData(val.iter(), normal_style.fg(blocking)) + } else if ctasks[i].due().is_some() { + Row::StyledData(val.iter(), normal_style) + } else { + Row::StyledData(val.iter(), normal_style) + } + }); let constraints: Vec = widths .iter() .map(|i| { diff --git a/src/color.rs b/src/color.rs index aa59c27..8da7997 100644 --- a/src/color.rs +++ b/src/color.rs @@ -345,7 +345,6 @@ impl TColor { } } - #[cfg(test)] mod tests { use crate::color::TColor;