on master help sign in
Run `cargo clippy --fix --all-targets --all-features` with Rust 1.57
e250da8Martin Nordholts
src/assets.rs+1−1
@@ -195,7 +195,7 @@ impl HighlightingAssets {
195 bat_warning!("Unknown theme '{}', using default.", theme)
195 bat_warning!("Unknown theme '{}', using default.", theme)
196 }
196 }
197 self.get_theme_set()
197 self.get_theme_set()
198− .get(self.fallback_theme.unwrap_or_else(|| Self::default_theme()))
198+ .get(self.fallback_theme.unwrap_or_else(Self::default_theme))
199 .expect("something is very wrong if the default theme is missing")
199 .expect("something is very wrong if the default theme is missing")
200 }
200 }
201 }
201 }
src/bin/bat/app.rs+1−1
@@ -307,7 +307,7 @@ impl App {
307 .map(|style_str| {
307 .map(|style_str| {
308 style_str
308 style_str
309 .split(',')
309 .split(',')
310− .map(|x| StyleComponent::from_str(x))
310+ .map(StyleComponent::from_str)
311 .collect::<Result<Vec<StyleComponent>>>()
311 .collect::<Result<Vec<StyleComponent>>>()
312 })
312 })
313 .transpose()?;
313 .transpose()?;
src/bin/bat/config.rs+1−1
@@ -104,7 +104,7 @@ fn get_args_from_str(content: &str) -> Result<Vec<OsString>, shell_words::ParseE
104 .map(|line| line.trim())
104 .map(|line| line.trim())
105 .filter(|line| !line.is_empty())
105 .filter(|line| !line.is_empty())
106 .filter(|line| !line.starts_with('#'))
106 .filter(|line| !line.starts_with('#'))
107− .map(|line| shell_words::split(line))
107+ .map(shell_words::split)
108 .collect::<Result<Vec<_>, _>>()?;
108 .collect::<Result<Vec<_>, _>>()?;
109
109
110 Ok(args_per_line
110 Ok(args_per_line