From b4b5f162688fcb43e28f9737080d58f1f442d79e Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 19 Mar 2024 17:11:33 +0000 Subject: [PATCH] vmm: acpi: Use .contains_key() --> vmm/src/acpi.rs:708:14 | 708 | .get(&(DeviceType::Serial, DeviceType::Serial.to_string())) | ______________^ 709 | | .is_some(); | |______________________^ help: replace it with: `contains_key(&(DeviceType::Serial, DeviceType::Serial.to_string()))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check = note: `-D clippy::unnecessary-get-then-check` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_get_then_check)]` Signed-off-by: Rob Bradford --- vmm/src/acpi.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vmm/src/acpi.rs b/vmm/src/acpi.rs index e89ffa3f2..42b36b38b 100644 --- a/vmm/src/acpi.rs +++ b/vmm/src/acpi.rs @@ -705,8 +705,7 @@ pub fn create_acpi_tables( .unwrap() .get_device_info() .clone() - .get(&(DeviceType::Serial, DeviceType::Serial.to_string())) - .is_some(); + .contains_key(&(DeviceType::Serial, DeviceType::Serial.to_string())); let serial_device_addr = arch::layout::LEGACY_SERIAL_MAPPED_IO_START.raw_value(); let serial_device_irq = if is_serial_on { device_manager