Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Enable `clippy::redundant_guards` (#8770)

Marshall Bowers6685d3ac976a
diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs
index c630a7dc9de..71c68a989d8 100644
--- a/crates/project/src/project.rs
+++ b/crates/project/src/project.rs
@@ -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 {
diff --git a/tooling/xtask/src/main.rs b/tooling/xtask/src/main.rs
index 2862d27d515..a0ad0fcd83a 100644
--- a/tooling/xtask/src/main.rs
+++ b/tooling/xtask/src/main.rs
@@ -103,7 +103,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
"clippy::non_canonical_clone_impl",
"clippy::non_canonical_partial_ord_impl",
"clippy::redundant_closure_call",
- "clippy::redundant_guards",
"clippy::reversed_empty_ranges",
"clippy::single_range_in_vec_init",
"clippy::suspicious_to_owned",