summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xbin/clippy1
-rw-r--r--devices/src/usb/host_backend/host_backend_device_provider.rs2
-rw-r--r--devices/src/usb/host_backend/utils.rs2
-rw-r--r--devices/src/usb/xhci/xhci_controller.rs14
-rw-r--r--devices/src/virtio/block.rs5
-rw-r--r--vm_control/src/lib.rs5
6 files changed, 8 insertions, 21 deletions
diff --git a/bin/clippy b/bin/clippy
index 3498589..1d9bf65 100755
--- a/bin/clippy
+++ b/bin/clippy
@@ -17,7 +17,6 @@ SUPPRESS=(
     question_mark
     range_plus_one
     unit_arg
-    unneeded_field_pattern
     unused_unit
     useless_format
 
diff --git a/devices/src/usb/host_backend/host_backend_device_provider.rs b/devices/src/usb/host_backend/host_backend_device_provider.rs
index 8aca33e..9e3f199 100644
--- a/devices/src/usb/host_backend/host_backend_device_provider.rs
+++ b/devices/src/usb/host_backend/host_backend_device_provider.rs
@@ -78,7 +78,7 @@ impl HostBackendDeviceProvider {
                 *self = HostBackendDeviceProvider::Started { inner };
                 Ok(())
             }
-            HostBackendDeviceProvider::Started { inner: _ } => {
+            HostBackendDeviceProvider::Started { .. } => {
                 error!("Host backend provider has already started");
                 Err(Error::BadBackendProviderState)
             }
diff --git a/devices/src/usb/host_backend/utils.rs b/devices/src/usb/host_backend/utils.rs
index 6ae0388..7d23bd4 100644
--- a/devices/src/usb/host_backend/utils.rs
+++ b/devices/src/usb/host_backend/utils.rs
@@ -31,7 +31,7 @@ pub fn update_transfer_state<T: UsbTransferBuffer>(
         XhciTransferState::Cancelling => {
             *state = XhciTransferState::Cancelled;
         }
-        XhciTransferState::Submitted { cancel_callback: _ } => {
+        XhciTransferState::Submitted { .. } => {
             *state = XhciTransferState::Completed;
         }
         _ => {
diff --git a/devices/src/usb/xhci/xhci_controller.rs b/devices/src/usb/xhci/xhci_controller.rs
index 3f2db74..03f2cfc 100644
--- a/devices/src/usb/xhci/xhci_controller.rs
+++ b/devices/src/usb/xhci/xhci_controller.rs
@@ -234,12 +234,8 @@ impl PciDevice for XhciController {
         if addr < bar0 || addr > bar0 + XHCI_BAR0_SIZE {
             return;
         }
-        match self.state {
-            XhciControllerState::Initialized {
-                ref mmio,
-                xhci: _,
-                fail_handle: _,
-            } => {
+        match &self.state {
+            XhciControllerState::Initialized { mmio, .. } => {
                 // Read bar would still work even if it's already failed.
                 mmio.read(addr - bar0, data);
             }
@@ -255,11 +251,9 @@ impl PciDevice for XhciController {
         if addr < bar0 || addr > bar0 + XHCI_BAR0_SIZE {
             return;
         }
-        match self.state {
+        match &self.state {
             XhciControllerState::Initialized {
-                ref mmio,
-                xhci: _,
-                ref fail_handle,
+                mmio, fail_handle, ..
             } => {
                 if !fail_handle.failed() {
                     mmio.write(addr - bar0, data);
diff --git a/devices/src/virtio/block.rs b/devices/src/virtio/block.rs
index 0a22e32..8c403a6 100644
--- a/devices/src/virtio/block.rs
+++ b/devices/src/virtio/block.rs
@@ -777,10 +777,7 @@ impl<T: DiskFile> Worker<T> {
                         };
 
                         let resp = match req {
-                            VmRequest::DiskResize {
-                                disk_index: _,
-                                new_size,
-                            } => {
+                            VmRequest::DiskResize { new_size, .. } => {
                                 needs_config_interrupt = true;
                                 self.resize(new_size)
                             }
diff --git a/vm_control/src/lib.rs b/vm_control/src/lib.rs
index fcf87e8..bf5851c 100644
--- a/vm_control/src/lib.rs
+++ b/vm_control/src/lib.rs
@@ -289,10 +289,7 @@ impl VmRequest {
                     Err(e) => VmResponse::Err(e),
                 }
             }
-            VmRequest::DiskResize {
-                disk_index,
-                new_size: _,
-            } => {
+            VmRequest::DiskResize { disk_index, .. } => {
                 // Forward the request to the block device process via its control socket.
                 if let Some(sock) = disk_host_sockets.get(disk_index) {
                     if let Err(e) = sock.send(self) {