From 99a98f270d8ac3acaff5a24d126e442350469bca Mon Sep 17 00:00:00 2001 From: Ravi kumar Veeramally Date: Mon, 26 Jun 2023 14:48:04 +0300 Subject: [PATCH] vm-allicator: Remove "new_without_default" clippy Add a Default implementation that delegates to new, so that clippy can be removed. Signed-off-by: Ravi kumar Veeramally --- vm-allocator/src/gsi.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vm-allocator/src/gsi.rs b/vm-allocator/src/gsi.rs index ed01bbfd4..19dec1776 100644 --- a/vm-allocator/src/gsi.rs +++ b/vm-allocator/src/gsi.rs @@ -63,7 +63,6 @@ impl GsiAllocator { } #[cfg(target_arch = "aarch64")] - #[allow(clippy::new_without_default)] /// New GSI allocator pub fn new() -> Self { GsiAllocator { @@ -106,3 +105,10 @@ impl GsiAllocator { Ok(irq) } } + +#[cfg(target_arch = "aarch64")] +impl Default for GsiAllocator { + fn default() -> Self { + GsiAllocator::new() + } +}