Skip to content

Commit eb27c8a

Browse files
author
Serban Iorga
committed
Silence false clippy warning
Signed-off-by: Serban Iorga <[email protected]>
1 parent a093f12 commit eb27c8a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vmm/src/rpc_interface.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,13 @@ impl<'a> PrebootApiController<'a> {
258258
G: Fn(ActionResult),
259259
{
260260
let mut vm_resources = VmResources::default();
261-
vm_resources.boot_timer = boot_timer_enabled;
261+
// Silence false clippy warning. Clippy suggests using
262+
// VmResources { boot_timer: boot_timer_enabled, ..Default::default() }; but this will
263+
// generate build errors because VmResources contains private fields.
264+
#[allow(clippy::field_reassign_with_default)]
265+
{
266+
vm_resources.boot_timer = boot_timer_enabled;
267+
}
262268
let mut preboot_controller = PrebootApiController::new(
263269
seccomp_filters,
264270
instance_info,

0 commit comments

Comments
 (0)