mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-31 10:11:07 +00:00
Run cargo clippy --fix --all-targets --all-features
with Rust 1.60
Clippy in the newly released Rust 1.60 found some new lints. Conveniently, all of them were fixable with `--fix`. By fixing these lints it becomes easier for us and others to see when new lints are introduced.
This commit is contained in:
parent
3ae05333b0
commit
acb1231e40
@ -91,7 +91,7 @@ pub fn get_args_from_config_file() -> Result<Vec<OsString>, shell_words::ParseEr
|
|||||||
.ok()
|
.ok()
|
||||||
.map(|content| get_args_from_str(&content))
|
.map(|content| get_args_from_str(&content))
|
||||||
.transpose()?
|
.transpose()?
|
||||||
.unwrap_or_else(Vec::new))
|
.unwrap_or_default())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_args_from_env_var() -> Option<Result<Vec<OsString>, shell_words::ParseError>> {
|
pub fn get_args_from_env_var() -> Option<Result<Vec<OsString>, shell_words::ParseError>> {
|
||||||
|
@ -118,7 +118,7 @@ impl OpenedInput<'_> {
|
|||||||
self.metadata
|
self.metadata
|
||||||
.user_provided_name
|
.user_provided_name
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.or_else(|| match self.kind {
|
.or(match self.kind {
|
||||||
OpenedInputKind::OrdinaryFile(ref path) => Some(path),
|
OpenedInputKind::OrdinaryFile(ref path) => Some(path),
|
||||||
_ => None,
|
_ => None,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user