Skip to content

Commit

Permalink
doc(examples): replace clone + assignment with clone_from
Browse files Browse the repository at this point in the history
Addresses `clippy::assigning_clones` lint.
  • Loading branch information
kawadakk committed Jul 9, 2024
1 parent cd51a3a commit 640b30a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/todomvc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl Component for App {
.filter(|e| self.state.filter.fits(e))
.nth(idx)
.unwrap();
self.state.edit_value = entry.description.clone();
self.state.edit_value.clone_from(&entry.description);
self.state.clear_all_edit();
self.state.toggle_edit(idx);
}
Expand Down

0 comments on commit 640b30a

Please sign in to comment.