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::map_identity` (#8731)

Marshall Bowers52052f342bc5
diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs
index b7c51539eb6..2f92ac71dea 100644
--- a/crates/lsp/src/lsp.rs
+++ b/crates/lsp/src/lsp.rs
@@ -340,7 +340,7 @@ impl LanguageServer {
io_tasks: Mutex::new(Some((input_task, output_task))),
output_done_rx: Mutex::new(Some(output_done_rx)),
root_path: root_path.to_path_buf(),
- server: Arc::new(Mutex::new(server.map(|server| server))),
+ server: Arc::new(Mutex::new(server)),
}
}
diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs
index 07a95198a00..11691aeb710 100644
--- a/crates/project/src/project.rs
+++ b/crates/project/src/project.rs
@@ -3665,7 +3665,7 @@ impl Project {
proto::LspWorkStart {
token,
message: report.message,
- percentage: report.percentage.map(|p| p),
+ percentage: report.percentage,
},
),
})
@@ -3691,7 +3691,7 @@ impl Project {
proto::LspWorkProgress {
token,
message: report.message,
- percentage: report.percentage.map(|p| p),
+ percentage: report.percentage,
},
),
})
diff --git a/tooling/xtask/src/main.rs b/tooling/xtask/src/main.rs
index bdf3e1b368f..cd7ce241701 100644
--- a/tooling/xtask/src/main.rs
+++ b/tooling/xtask/src/main.rs
@@ -105,7 +105,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
"clippy::manual_flatten",
"clippy::map_entry",
"clippy::map_flatten",
- "clippy::map_identity",
"clippy::needless_arbitrary_self_type",
"clippy::needless_borrowed_reference",
"clippy::needless_lifetimes",