Enable clippy::redundant_guards (#8770)

This PR enables the
[`clippy::redundant_guards`](https://rust-lang.github.io/rust-clippy/master/index.html#/redundant_guards)
rule and fixes the outstanding violations.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-03-03 10:43:13 -05:00 committed by GitHub
parent bfc648553f
commit 6685d3ac97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -9379,7 +9379,7 @@ fn relativize_path(base: &Path, path: &Path) -> PathBuf {
}
(None, _) => components.push(Component::ParentDir),
(Some(a), Some(b)) if components.is_empty() && a == b => (),
(Some(a), Some(b)) if b == Component::CurDir => components.push(a),
(Some(a), Some(Component::CurDir)) => components.push(a),
(Some(a), Some(_)) => {
components.push(Component::ParentDir);
for _ in base_components {