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 <rbradford@rivosinc.com>
This commit is contained in:
Rob Bradford 2024-03-19 17:11:33 +00:00 committed by Bo Chen
parent b8e84f09be
commit b4b5f16268

View File

@ -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