Fix clippy::redundant_clone
lint violations (#36558)
This removes around 900 unnecessary clones, ranging from cloning a few ints all the way to large data structures and images. A lot of these were fixed using `cargo clippy --fix --workspace --all-targets`, however it often breaks other lints and needs to be run again. This was then followed up with some manual fixing. I understand this is a large diff, but all the changes are pretty trivial. Rust is doing some heavy lifting here for us. Once I get it up to speed with main, I'd appreciate this getting merged rather sooner than later. Release Notes: - N/A
This commit is contained in:
parent
cf7c64d77f
commit
7bdc99abc1
306 changed files with 805 additions and 1102 deletions
|
@ -158,7 +158,7 @@ impl VsCodeThemeConverter {
|
|||
.tab
|
||||
.active_background
|
||||
.clone()
|
||||
.or(vscode_tab_inactive_background.clone()),
|
||||
.or(vscode_tab_inactive_background),
|
||||
search_match_background: vscode_colors.editor.find_match_background.clone(),
|
||||
panel_background: vscode_colors.panel.background.clone(),
|
||||
pane_group_border: vscode_colors.editor_group.border.clone(),
|
||||
|
@ -171,22 +171,20 @@ impl VsCodeThemeConverter {
|
|||
.scrollbar_slider
|
||||
.active_background
|
||||
.clone(),
|
||||
scrollbar_thumb_border: vscode_scrollbar_slider_background.clone(),
|
||||
scrollbar_thumb_border: vscode_scrollbar_slider_background,
|
||||
scrollbar_track_background: vscode_editor_background.clone(),
|
||||
scrollbar_track_border: vscode_colors.editor_overview_ruler.border.clone(),
|
||||
minimap_thumb_background: vscode_colors.minimap_slider.background.clone(),
|
||||
minimap_thumb_hover_background: vscode_colors.minimap_slider.hover_background.clone(),
|
||||
minimap_thumb_active_background: vscode_colors.minimap_slider.active_background.clone(),
|
||||
editor_foreground: vscode_editor_foreground
|
||||
.clone()
|
||||
.or(vscode_token_colors_foreground.clone()),
|
||||
editor_foreground: vscode_editor_foreground.or(vscode_token_colors_foreground),
|
||||
editor_background: vscode_editor_background.clone(),
|
||||
editor_gutter_background: vscode_editor_background.clone(),
|
||||
editor_gutter_background: vscode_editor_background,
|
||||
editor_active_line_background: vscode_colors.editor.line_highlight_background.clone(),
|
||||
editor_line_number: vscode_colors.editor_line_number.foreground.clone(),
|
||||
editor_active_line_number: vscode_colors.editor.foreground.clone(),
|
||||
editor_wrap_guide: vscode_panel_border.clone(),
|
||||
editor_active_wrap_guide: vscode_panel_border.clone(),
|
||||
editor_active_wrap_guide: vscode_panel_border,
|
||||
editor_document_highlight_bracket_background: vscode_colors
|
||||
.editor_bracket_match
|
||||
.background
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue