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:
Martin Nordholts 2021-12-08 08:29:10 +01:00
parent 3ae05333b0
commit acb1231e40
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ pub fn get_args_from_config_file() -> Result<Vec<OsString>, shell_words::ParseEr
.ok()
.map(|content| get_args_from_str(&content))
.transpose()?
.unwrap_or_else(Vec::new))
.unwrap_or_default())
}
pub fn get_args_from_env_var() -> Option<Result<Vec<OsString>, shell_words::ParseError>> {

View File

@ -118,7 +118,7 @@ impl OpenedInput<'_> {
self.metadata
.user_provided_name
.as_ref()
.or_else(|| match self.kind {
.or(match self.kind {
OpenedInputKind::OrdinaryFile(ref path) => Some(path),
_ => None,
})