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:
parent
7443a9f69e
commit
8c50450002
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue