Skip to content

Commit e250da8

Browse files
committed
Run cargo clippy --fix --all-targets --all-features with Rust 1.57
Clippy in the newly released Rust 1.57 found some new lints. Conveniently, all of them were fixable with `--fix`.
1 parent 7fceb48 commit e250da8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/assets.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl HighlightingAssets {
195195
bat_warning!("Unknown theme '{}', using default.", theme)
196196
}
197197
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))
199199
.expect("something is very wrong if the default theme is missing")
200200
}
201201
}

src/bin/bat/app.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ impl App {
307307
.map(|style_str| {
308308
style_str
309309
.split(',')
310-
.map(|x| StyleComponent::from_str(x))
310+
.map(StyleComponent::from_str)
311311
.collect::<Result<Vec<StyleComponent>>>()
312312
})
313313
.transpose()?;

src/bin/bat/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn get_args_from_str(content: &str) -> Result<Vec<OsString>, shell_words::ParseE
104104
.map(|line| line.trim())
105105
.filter(|line| !line.is_empty())
106106
.filter(|line| !line.starts_with('#'))
107-
.map(|line| shell_words::split(line))
107+
.map(shell_words::split)
108108
.collect::<Result<Vec<_>, _>>()?;
109109

110110
Ok(args_per_line

0 commit comments

Comments
 (0)