Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Enable `clippy::iter_overeager_cloned` (#8839)
Marshall Bowers9ea50ed6496c
diff --git a/crates/language/src/syntax_map.rs b/crates/language/src/syntax_map.rsindex e517a9f092d..926c4a36eda 100644--- a/crates/language/src/syntax_map.rs+++ b/crates/language/src/syntax_map.rs@@ -614,9 +614,12 @@ impl SyntaxSnapshot {Some(old_tree.clone()),);changed_ranges = join_ranges(- invalidated_ranges.iter().cloned().filter(|range| {- range.start <= step_end_byte && range.end >= step_start_byte- }),+ invalidated_ranges+ .iter()+ .filter(|&range| {+ range.start <= step_end_byte && range.end >= step_start_byte+ })+ .cloned(),old_tree.changed_ranges(&tree).map(|r| {step_start_byte + r.start_byte..step_start_byte + r.end_byte}),diff --git a/tooling/xtask/src/main.rs b/tooling/xtask/src/main.rsindex 1f075c59d44..69b6bc95bbf 100644--- a/tooling/xtask/src/main.rs+++ b/tooling/xtask/src/main.rs@@ -88,7 +88,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {"clippy::derive_ord_xor_partial_ord","clippy::eq_op","clippy::implied_bounds_in_impls",- "clippy::iter_overeager_cloned","clippy::let_underscore_future","clippy::map_entry","clippy::never_loop",