From 347aa35c91f453275c88b067451c63a5b833cfcf Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Thu, 25 Dec 2025 12:42:27 -0500 Subject: [PATCH] clippy --- crates/editor/src/split.rs | 6 +++--- crates/multi_buffer/src/multi_buffer.rs | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/editor/src/split.rs b/crates/editor/src/split.rs index b42e49bcf33926ef18bd02c640c2b8b5f8e1fb22..e99f56b8803ee2931fed2406c18cb5bb003be37b 100644 --- a/crates/editor/src/split.rs +++ b/crates/editor/src/split.rs @@ -415,11 +415,11 @@ impl SplittableEditor { let secondary_snapshot = secondary.multibuffer.read(cx).snapshot(cx); let primary_diff_hunks = primary_snapshot .diff_hunks() - .map(|hunk| hunk.diff_base_byte_range.clone()) + .map(|hunk| hunk.diff_base_byte_range) .collect::>(); let secondary_diff_hunks = secondary_snapshot .diff_hunks() - .map(|hunk| hunk.diff_base_byte_range.clone()) + .map(|hunk| hunk.diff_base_byte_range) .collect::>(); pretty_assertions::assert_eq!(primary_diff_hunks, secondary_diff_hunks); @@ -734,7 +734,7 @@ mod tests { let diff_snapshot = diff.read(cx).snapshot(cx); let ranges = diff_snapshot .hunks(&buffer_snapshot) - .map(|hunk| hunk.range.clone()) + .map(|hunk| hunk.range) .collect::>(); let path = PathKey::for_buffer(&buffer, cx); editor.set_excerpts_for_path(path, buffer, ranges, 2, diff, cx); diff --git a/crates/multi_buffer/src/multi_buffer.rs b/crates/multi_buffer/src/multi_buffer.rs index 2b6b10825e8a3ac61656871ba771bf989f57c521..c3c74d965f3739b674c1def4051517de021121f7 100644 --- a/crates/multi_buffer/src/multi_buffer.rs +++ b/crates/multi_buffer/src/multi_buffer.rs @@ -2552,8 +2552,7 @@ impl MultiBuffer { text::Anchor::min_max_range_for_buffer(buffer_id), cx, ); - self.diffs - .insert(buffer_id, DiffState::new(diff.clone(), cx)); + self.diffs.insert(buffer_id, DiffState::new(diff, cx)); } pub fn add_inverted_diff(