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 <ravikumar.veeramally@intel.com>
This commit is contained in:
Ravi kumar Veeramally 2023-06-26 14:48:04 +03:00 committed by Bo Chen
parent c0af33a4c9
commit 99a98f270d

View File

@ -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()
}
}