mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user