mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:16:05 +02:00
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:
committed by
GitHub
parent
f44473d510
commit
f7647584a3
@ -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() {
|
||||
|
Reference in New Issue
Block a user