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:
Rob Bradford 2022-06-30 16:41:46 +01:00
parent b57d7b258d
commit 44eca31642

View File

@ -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);
}