Skip to content

Commit cbf7f51

Browse files
author
Your Name
committed
Follow clippy suggestions
1 parent c8c1b63 commit cbf7f51

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

gix-blame/src/file/function.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ where
232232
std::collections::BTreeMap::<ObjectId, Vec<Range<u32>>>::new(),
233233
|mut acc, hunk| {
234234
for (suspect, range) in hunk.suspects.clone() {
235-
acc.entry(suspect).or_insert(Vec::new()).push(range);
235+
acc.entry(suspect).or_default().push(range);
236236
}
237237

238238
acc
@@ -243,11 +243,8 @@ where
243243
ranges.sort_by(|a, b| a.start.cmp(&b.start));
244244

245245
for window in ranges.windows(2) {
246-
match window {
247-
[a, b] => {
248-
assert!(a.end <= b.start, "#{hunks_to_blame:#?}");
249-
}
250-
_ => {}
246+
if let [a, b] = window {
247+
assert!(a.end <= b.start, "#{hunks_to_blame:#?}");
251248
}
252249
}
253250
}

0 commit comments

Comments
 (0)