Skip to content

Commit 3961481

Browse files
committed
Feedback
1 parent e3d25cd commit 3961481

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

vm/devices/vmbus/vmbus_server/src/proxyintegration.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,11 @@ impl SavedStatePair {
251251
}
252252
}
253253

254-
struct VpToPhysicalNodeMap(Option<Vec<u16>>);
254+
struct VpToPhysicalNodeMap(Vec<u16>);
255255

256256
impl VpToPhysicalNodeMap {
257257
fn get_numa_node(&self, vp_index: u32) -> u16 {
258-
self.0.as_ref().map_or(0, |nodes| {
259-
nodes.get(vp_index as usize).copied().unwrap_or(0)
260-
})
258+
self.0.get(vp_index as usize).copied().unwrap_or(0)
261259
}
262260
}
263261

@@ -1159,7 +1157,7 @@ async fn proxy_thread(
11591157
hvsock_response_send,
11601158
vtl2_hvsock_response_send,
11611159
Arc::clone(&proxy),
1162-
VpToPhysicalNodeMap(vp_to_physical_node_map),
1160+
VpToPhysicalNodeMap(vp_to_physical_node_map.unwrap_or_default()),
11631161
));
11641162
let offers = task.run_proxy_actions(send, flush_recv, await_flush);
11651163
let requests = task.run_server_requests(

0 commit comments

Comments
 (0)