mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-10-22 20:36:34 +00:00
Fix clippy::assigning_clones lints
Use the potentially more efficient clone_from() function when cloning and assigning. BUG=b:344974550 TEST=tools/clippy Change-Id: I0601b59a80fdebbc09b212110c6e68e23a52bcfe Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5604659 Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
349eb22eb8
commit
4c2fa9d76d
3 changed files with 3 additions and 3 deletions
|
@ -161,7 +161,7 @@ fn do_overlay_filter(filtered_paths: Vec<Path>, overlay: &mut Fdt) {
|
|||
tgt_node = tgt_node
|
||||
.subnode_mut(node_name)
|
||||
.expect("filtered paths reference valid nodes");
|
||||
tgt_node.props = src_node.props.clone();
|
||||
tgt_node.props.clone_from(&src_node.props);
|
||||
}
|
||||
}
|
||||
overlay.root = new_root;
|
||||
|
|
|
@ -451,7 +451,7 @@ impl StreamInfo {
|
|||
self.buffer_bytes = state.buffer_bytes;
|
||||
self.period_bytes = state.period_bytes;
|
||||
self.direction = state.direction;
|
||||
self.effects = state.effects.clone();
|
||||
self.effects.clone_from(&state.effects);
|
||||
self.just_reset = state.just_reset;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -763,7 +763,7 @@ fn crosvm_main<I: IntoIterator<Item = String>>(args: I) -> Result<CommandStatus>
|
|||
`crosvm --syslog-tag=\"{}\" run` instead",
|
||||
syslog_tag
|
||||
);
|
||||
log_config.log_args.proc_name = syslog_tag.clone();
|
||||
log_config.log_args.proc_name.clone_from(syslog_tag);
|
||||
}
|
||||
// We handle run_vm separately because it does not simply signal success/error
|
||||
// but also indicates whether the guest requested reset or stop.
|
||||
|
|
Loading…
Reference in a new issue