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:
Rob Bradford 2022-01-07 10:29:53 +00:00 committed by Bo Chen
parent 8fa3864ae8
commit 70af81d755

View File

@ -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,
));
}