From 1ea2671f2f803585bb8beecb34cb69e4cc4754b9 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Thu, 13 Jun 2024 16:04:09 +0100 Subject: [PATCH] dragonball: Fix lint with rust 1.75.0 The ci failed with: ``` error: use of `or_insert_with` to construct default value --> src/address_space_manager.rs:650:14 | 650 | .or_insert_with(NumaNode::new); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | ``` Signed-off-by: stevenhorsman --- src/dragonball/src/address_space_manager.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/dragonball/src/address_space_manager.rs b/src/dragonball/src/address_space_manager.rs index 6efdb027ad..3c4de6c668 100644 --- a/src/dragonball/src/address_space_manager.rs +++ b/src/dragonball/src/address_space_manager.rs @@ -644,10 +644,7 @@ impl AddressSpaceMgr { guest_numa_node_id: u32, vcpu_ids: &[u32], ) { - let node = self - .numa_nodes - .entry(guest_numa_node_id) - .or_insert_with(NumaNode::new); + let node = self.numa_nodes.entry(guest_numa_node_id).or_default(); node.add_info(&NumaNodeInfo { base: region.start_addr(), size: region.len(),