Clippy with the current stable toolchain (#6615)

Fix lints that are coming with rust 1.64

Passes with the earlier toolchain from `rust-toolchain.toml` as well.
This commit is contained in:
Stefan Holderbach
2022-09-26 19:29:25 +02:00
committed by GitHub
parent f44473d510
commit f7647584a3
11 changed files with 13 additions and 25 deletions

View File

@ -199,9 +199,7 @@ pub fn glob_with(pattern: &str, options: MatchOptions) -> Result<Paths, PatternE
}
// make sure that the pattern is valid first, else early return with error
if let Err(err) = Pattern::new(pattern) {
return Err(err);
}
Pattern::new(pattern)?;
let mut components = Path::new(pattern).components().peekable();
while let Some(&Component::Prefix(..)) | Some(&Component::RootDir) = components.peek() {