mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
vmm: config: Fix clippy (unnecessary_to_owned) issue
warning: unnecessary use of `to_string` --> vmm/src/config.rs:2199:38 | 2199 | ... .get(&memory_zone.to_string()) | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `memory_zone` | = note: `#[warn(clippy::unnecessary_to_owned)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
8fa3864ae8
commit
70af81d755
@ -2195,9 +2195,7 @@ impl VmConfig {
|
||||
} else {
|
||||
return Err(ValidationError::MemoryZoneReused(
|
||||
memory_zone.to_string(),
|
||||
*used_numa_node_memory_zones
|
||||
.get(&memory_zone.to_string())
|
||||
.unwrap(),
|
||||
*used_numa_node_memory_zones.get(memory_zone).unwrap(),
|
||||
numa_node.guest_numa_id,
|
||||
));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user