From 70af81d755ad1f961684cf6bf7a57f9e9674bb45 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 7 Jan 2022 10:29:53 +0000 Subject: [PATCH] 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 --- vmm/src/config.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vmm/src/config.rs b/vmm/src/config.rs index 8f99d81ca..1162fc2b1 100644 --- a/vmm/src/config.rs +++ b/vmm/src/config.rs @@ -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, )); }