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:
@@ -101,14 +101,11 @@ impl RenderOnce for ToolCallCardHeader {
|
||||
})
|
||||
.when_some(secondary_text, |this, secondary_text| {
|
||||
this.child(bullet_divider())
|
||||
.child(div().text_size(font_size).child(secondary_text.clone()))
|
||||
.child(div().text_size(font_size).child(secondary_text))
|
||||
})
|
||||
.when_some(code_path, |this, code_path| {
|
||||
this.child(bullet_divider()).child(
|
||||
Label::new(code_path.clone())
|
||||
.size(LabelSize::Small)
|
||||
.inline_code(cx),
|
||||
)
|
||||
this.child(bullet_divider())
|
||||
.child(Label::new(code_path).size(LabelSize::Small).inline_code(cx))
|
||||
})
|
||||
.with_animation(
|
||||
"loading-label",
|
||||
|
||||
Reference in New Issue
Block a user