diff options
author | Martin Nordholts <enselic@gmail.com> | 2021-12-08 08:29:10 +0100 |
---|---|---|
committer | Martin Nordholts <enselic@gmail.com> | 2021-12-08 08:45:04 +0100 |
commit | e250da8aaa6fc8e09b3c7881838d22843ef3fcda (patch) | |
tree | ab2c35f3d42f0e159e714eff68591c520efce42b | |
parent | 7fceb4878fd3da27cea9562f20342e5fb64c37eb (diff) |
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`.
-rw-r--r-- | src/assets.rs | 2 | ||||
-rw-r--r-- | src/bin/bat/app.rs | 2 | ||||
-rw-r--r-- | src/bin/bat/config.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/assets.rs b/src/assets.rs index 9e734023..ec80c1ea 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -195,7 +195,7 @@ impl HighlightingAssets { bat_warning!("Unknown theme '{}', using default.", theme) } self.get_theme_set() - .get(self.fallback_theme.unwrap_or_else(|| Self::default_theme())) + .get(self.fallback_theme.unwrap_or_else(Self::default_theme)) .expect("something is very wrong if the default theme is missing") } } diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs index 842eec65..0b17abce 100644 --- a/src/bin/bat/app.rs +++ b/src/bin/bat/app.rs @@ -307,7 +307,7 @@ impl App { .map(|style_str| { style_str .split(',') - .map(|x| StyleComponent::from_str(x)) + .map(StyleComponent::from_str) .collect::<Result<Vec<StyleComponent>>>() }) .transpose()?; diff --git a/src/bin/bat/config.rs b/src/bin/bat/config.rs index 12fba8bd..659f67b3 100644 --- a/src/bin/bat/config.rs +++ b/src/bin/bat/config.rs @@ -104,7 +104,7 @@ fn get_args_from_str(content: &str) -> Result<Vec<OsString>, shell_words::ParseE .map(|line| line.trim()) .filter(|line| !line.is_empty()) .filter(|line| !line.starts_with('#')) - .map(|line| shell_words::split(line)) + .map(shell_words::split) .collect::<Result<Vec<_>, _>>()?; Ok(args_per_line |