Skip to content

Commit

Permalink
refactor: Avoid clone in assignments (#655)
Browse files Browse the repository at this point in the history
* codecov: RS-W1070

* fix(vars): var-name merge-conflict

---------

Co-authored-by: Himadri Bhattacharjee <[email protected]>
  • Loading branch information
Rudxain and lavafroth authored Sep 26, 2024
1 parent 3727469 commit 8ee7b0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl Config {
.iter_mut()
.find(|x| x.device_id == *device_id)
{
*device = settings.device.clone();
device.clone_from(&settings.device);
} else {
debug!("config: New device settings saved");
config.devices.push(settings.device.clone());
Expand Down
3 changes: 1 addition & 2 deletions src/gui/views/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ impl List {
Message::LoadPhonePackages,
)
}
Message::LoadPhonePackages(list_box) => {
let (uad_list, list_state) = list_box;
Message::LoadPhonePackages((uad_list, list_state)) => {
self.loading_state = LoadingState::LoadingPackages;
self.uad_lists.clone_from(&uad_list);
*list_update_state = list_state;
Expand Down

0 comments on commit 8ee7b0b

Please sign in to comment.