Skip to content

Commit

Permalink
Run cargo clippy --fix --all-targets --all-features with Rust 1.57
Browse files Browse the repository at this point in the history
Clippy in the newly released Rust 1.57 found some new lints. Conveniently, all
of them were fixable with `--fix`.
  • Loading branch information
Enselic committed Dec 8, 2021
1 parent 7fceb48 commit e250da8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bin/bat/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;
Expand Down
2 changes: 1 addition & 1 deletion src/bin/bat/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e250da8

Please sign in to comment.