clean up. fix lint and formatting.
@@ -34,10 +34,7 @@ pub fn is_a_tty(_: bool) -> bool {
false
}
-
-pub fn is_term_dumb() -> bool {
- return env::var("TERM").ok() == Some(String::from("dumb"))
-}
+pub fn is_term_dumb() -> bool { env::var("TERM").ok() == Some(String::from("dumb")) }
#[doc(hidden)]
pub struct ColorizerOption {
@@ -71,7 +68,7 @@ impl Colorizer {
option.when
} else {
ColorWhen::Never
- }
+ },
}
}
@@ -108,7 +105,7 @@ impl Default for Colorizer {
fn default() -> Self {
Colorizer::new(ColorizerOption {
use_stderr: true,
- when:ColorWhen::Auto
+ when: ColorWhen::Auto,
})
}
}
