Fix miscellaneous Clippy lints

This commit is contained in:
Aramis Razzaghipour
2021-10-03 23:45:08 +11:00
parent 55c0b86cde
commit eff195852d
21 changed files with 40 additions and 51 deletions

View File

@@ -271,7 +271,7 @@ impl RelPath {
/// Taken from <https://github.com/rust-lang/cargo/blob/79c769c3d7b4c2cf6a93781575b7f592ef974255/src/cargo/util/paths.rs#L60-L85>
fn normalize_path(path: &Path) -> PathBuf {
let mut components = path.components().peekable();
let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().cloned() {
let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().copied() {
components.next();
PathBuf::from(c.as_os_str())
} else {