Skip to content

Commit

Permalink
Silence false clippy warning
Browse files Browse the repository at this point in the history
Signed-off-by: Serban Iorga <[email protected]>
  • Loading branch information
Serban Iorga committed May 21, 2021
1 parent a093f12 commit eb27c8a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/vmm/src/rpc_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,13 @@ impl<'a> PrebootApiController<'a> {
G: Fn(ActionResult),
{
let mut vm_resources = VmResources::default();
vm_resources.boot_timer = boot_timer_enabled;
// Silence false clippy warning. Clippy suggests using
// VmResources { boot_timer: boot_timer_enabled, ..Default::default() }; but this will
// generate build errors because VmResources contains private fields.
#[allow(clippy::field_reassign_with_default)]
{
vm_resources.boot_timer = boot_timer_enabled;
}
let mut preboot_controller = PrebootApiController::new(
seccomp_filters,
instance_info,
Expand Down

0 comments on commit eb27c8a

Please sign in to comment.