mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: reevaluate #[allow] attributes
Remove stale #[allow]s whose lints no longer fire, convert the unconditionally-firing ones to #[expect], and keep the conditional ones as #[allow] (e.g. large_enum_variant only fires when both kvm and mshv are enabled; a nonminimal_bool only on x86). The many unreachable_patterns allows are feature-gated and left as #[allow]. Part of #8326. Signed-off-by: Tushar Khatri <hello@tusharkhatri.in>
This commit is contained in:
committed by
Rob Bradford
parent
d6e59a0be7
commit
859bce5cae
@@ -1512,7 +1512,7 @@ pub type KvmResult<T> = result::Result<T, KvmError>;
|
||||
|
||||
impl KvmHypervisor {
|
||||
/// Create a hypervisor based on Kvm
|
||||
#[allow(clippy::new_ret_no_self)]
|
||||
#[expect(clippy::new_ret_no_self)]
|
||||
pub fn new() -> hypervisor::Result<Arc<dyn hypervisor::Hypervisor>> {
|
||||
let kvm_obj = Kvm::new().map_err(|e| hypervisor::HypervisorError::VmCreate(e.into()))?;
|
||||
let api_version = kvm_obj.get_api_version();
|
||||
|
||||
Reference in New Issue
Block a user