mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +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:
@@ -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,
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user