Skip to content

Commit 4181e98

Browse files
committed
refactor: drop pointless .map() calls
The return value here was ignored anyway, so no need to map the unit () to VmmData::Empty. Signed-off-by: Patrick Roy <[email protected]>
1 parent 76f1527 commit 4181e98

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/vmm/src/rpc_interface.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,14 +808,12 @@ impl RuntimeApiController {
808808
// vhost-user-block updates
809809
if new_cfg.path_on_host.is_none() && new_cfg.rate_limiter.is_none() {
810810
vmm.update_vhost_user_block_config(&new_cfg.drive_id)
811-
.map(|()| VmmData::Empty)
812811
.map_err(DriveError::DeviceUpdate)?;
813812
}
814813

815814
// virtio-block updates
816815
if let Some(new_path) = new_cfg.path_on_host {
817816
vmm.update_block_device_path(&new_cfg.drive_id, new_path)
818-
.map(|()| VmmData::Empty)
819817
.map_err(DriveError::DeviceUpdate)?;
820818
}
821819
if new_cfg.rate_limiter.is_some() {
@@ -824,7 +822,6 @@ impl RuntimeApiController {
824822
RateLimiterUpdate::from(new_cfg.rate_limiter).bandwidth,
825823
RateLimiterUpdate::from(new_cfg.rate_limiter).ops,
826824
)
827-
.map(|()| VmmData::Empty)
828825
.map_err(DriveError::DeviceUpdate)?;
829826
}
830827
Ok(VmmData::Empty)

0 commit comments

Comments
 (0)