Janitor: Fix clippy::redundant_clone

This commit is contained in:
Tobias Hunger 2021-08-17 22:24:32 +02:00 committed by Olivier Goffart
parent 8f5d3ab50f
commit c7d27d5ace
4 changed files with 6 additions and 6 deletions

View file

@ -39,9 +39,9 @@ fn main() {
let is_pair_solved = t1 == t2;
if is_pair_solved {
t1.solved = true;
tiles_model.set_row_data(t1_idx, t1.clone());
tiles_model.set_row_data(t1_idx, t1);
t2.solved = true;
tiles_model.set_row_data(t2_idx, t2.clone());
tiles_model.set_row_data(t2_idx, t2);
} else {
let main_window = main_window_weak.unwrap();
main_window.set_disable_tiles(true);

View file

@ -26,7 +26,7 @@ fn main() {
// Assign the shuffled Vec to the model property
let tiles_model = std::rc::Rc::new(sixtyfps::VecModel::from(tiles));
main_window.set_memory_tiles(sixtyfps::ModelHandle::new(tiles_model.clone()));
main_window.set_memory_tiles(sixtyfps::ModelHandle::new(tiles_model));
main_window.run();
}