Fix clippy::map_clone
lint violations (#36585)
#36577 Release Notes: - N/A
This commit is contained in:
parent
eaf6b56163
commit
92352f97ad
4 changed files with 4 additions and 3 deletions
|
@ -879,6 +879,7 @@ manual_pattern_char_comparison = "warn"
|
||||||
manual_rotate = "warn"
|
manual_rotate = "warn"
|
||||||
manual_slice_fill = "warn"
|
manual_slice_fill = "warn"
|
||||||
manual_while_let_some = "warn"
|
manual_while_let_some = "warn"
|
||||||
|
map_clone = "warn"
|
||||||
map_collect_result_unit = "warn"
|
map_collect_result_unit = "warn"
|
||||||
match_like_matches_macro = "warn"
|
match_like_matches_macro = "warn"
|
||||||
match_overlapping_arm = "warn"
|
match_overlapping_arm = "warn"
|
||||||
|
|
|
@ -1335,7 +1335,7 @@ impl GitPanel {
|
||||||
section.contains(status_entry, repository)
|
section.contains(status_entry, repository)
|
||||||
&& status_entry.staging.as_bool() != Some(goal_staged_state)
|
&& status_entry.staging.as_bool() != Some(goal_staged_state)
|
||||||
})
|
})
|
||||||
.map(|status_entry| status_entry.clone())
|
.cloned()
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
(goal_staged_state, entries)
|
(goal_staged_state, entries)
|
||||||
|
|
|
@ -2108,7 +2108,7 @@ fn current_pointer_device_states(
|
||||||
.classes
|
.classes
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|class| class.data.as_scroll())
|
.filter_map(|class| class.data.as_scroll())
|
||||||
.map(|class| *class)
|
.copied()
|
||||||
.rev()
|
.rev()
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let old_state = scroll_values_to_preserve.get(&info.deviceid);
|
let old_state = scroll_values_to_preserve.get(&info.deviceid);
|
||||||
|
|
|
@ -3082,7 +3082,7 @@ impl Pane {
|
||||||
.read(cx)
|
.read(cx)
|
||||||
.items()
|
.items()
|
||||||
.find(|item| item.item_id() == item_id)
|
.find(|item| item.item_id() == item_id)
|
||||||
.map(|item| item.clone())
|
.cloned()
|
||||||
else {
|
else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue