Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Enable `clippy::unnecessary_find_map` (#8740)
Marshall Bowers3e287911c3a0
diff --git a/crates/collab_ui/src/chat_panel.rs b/crates/collab_ui/src/chat_panel.rsindex b2285c51425..9ba422dd5a1 100644--- a/crates/collab_ui/src/chat_panel.rs+++ b/crates/collab_ui/src/chat_panel.rs@@ -839,12 +839,8 @@ impl Render for ChatPanel {let reply_message = self.active_chat().and_then(|active_chat| {- active_chat.read(cx).messages().iter().find_map(|m| {- if m.id == ChannelMessageId::Saved(reply_to_message_id) {- Some(m)- } else {- None- }+ active_chat.read(cx).messages().iter().find(|message| {+ message.id == ChannelMessageId::Saved(reply_to_message_id)})}).cloned();diff --git a/tooling/xtask/src/main.rs b/tooling/xtask/src/main.rsindex 11f3df1e3cc..e75ec5a99ce 100644--- a/tooling/xtask/src/main.rs+++ b/tooling/xtask/src/main.rs@@ -123,7 +123,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {"clippy::suspicious_to_owned","clippy::type_complexity","clippy::unit_arg",- "clippy::unnecessary_find_map","clippy::unnecessary_operation","clippy::unnecessary_to_owned","clippy::unnecessary_unwrap",