mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: don't needlessly clone strings
On-behalf-of: SAP julian.stecklina@sap.com Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
7443a9f69e
commit
8c50450002
@@ -1623,7 +1623,7 @@ impl RequestHandler for Vmm {
|
||||
for net in restored_nets.iter() {
|
||||
for net_config in vm_net_configs.iter_mut() {
|
||||
// update only if the net dev is backed by FDs
|
||||
if net_config.id == Some(net.id.clone()) && net_config.fds.is_some() {
|
||||
if net_config.id.as_ref() == Some(&net.id) && net_config.fds.is_some() {
|
||||
net_config.fds.clone_from(&net.fds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user