mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
build: Fix beta clippy issue (needless_return)
warning: accessing first element with `data.get(0)` --> virtio-devices/src/transport/pci_device.rs:1055:34 | 1055 | if let Some(v) = data.get(0) { | ^^^^^^^^^^^ help: try: `data.first()` | = note: `#[warn(clippy::get_first)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
b57d7b258d
commit
44eca31642
@ -1052,7 +1052,7 @@ impl PciDevice for VirtioPciDevice {
|
||||
self.device.clone(),
|
||||
),
|
||||
o if (ISR_CONFIG_BAR_OFFSET..ISR_CONFIG_BAR_OFFSET + ISR_CONFIG_SIZE).contains(&o) => {
|
||||
if let Some(v) = data.get(0) {
|
||||
if let Some(v) = data.first() {
|
||||
self.interrupt_status
|
||||
.fetch_and(!(*v as usize), Ordering::AcqRel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user