summary refs log tree commit diff
path: root/devices/src/usb
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@chromium.org>2019-04-12 19:48:10 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-17 17:22:56 -0700
commitd611f27cb171521cb9d0d0d1b3a5eb1ead1a0b25 (patch)
treecc0b3f15e8958c7c8b67b7d8a57eb252ed1e11cb /devices/src/usb
parent2b82fbbedaf774e623221d1e599d6236cb3d4945 (diff)
downloadcrosvm-d611f27cb171521cb9d0d0d1b3a5eb1ead1a0b25.tar
crosvm-d611f27cb171521cb9d0d0d1b3a5eb1ead1a0b25.tar.gz
crosvm-d611f27cb171521cb9d0d0d1b3a5eb1ead1a0b25.tar.bz2
crosvm-d611f27cb171521cb9d0d0d1b3a5eb1ead1a0b25.tar.lz
crosvm-d611f27cb171521cb9d0d0d1b3a5eb1ead1a0b25.tar.xz
crosvm-d611f27cb171521cb9d0d0d1b3a5eb1ead1a0b25.tar.zst
crosvm-d611f27cb171521cb9d0d0d1b3a5eb1ead1a0b25.zip
clippy: Resolve unused_unit
TEST=bin/clippy

Change-Id: I96fe9711d99a999cda706a8b78f79ff5ef8f60de
Reviewed-on: https://chromium-review.googlesource.com/1566892
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'devices/src/usb')
-rw-r--r--devices/src/usb/host_backend/host_backend_device_provider.rs2
-rw-r--r--devices/src/usb/host_backend/host_device.rs1
-rw-r--r--devices/src/usb/xhci/command_ring_controller.rs4
-rw-r--r--devices/src/usb/xhci/transfer_ring_controller.rs1
4 files changed, 0 insertions, 8 deletions
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 9e3f199..beae028 100644
--- a/devices/src/usb/host_backend/host_backend_device_provider.rs
+++ b/devices/src/usb/host_backend/host_backend_device_provider.rs
@@ -100,7 +100,6 @@ impl XhciBackendDeviceProvider for HostBackendDeviceProvider {
         self.start_helper(fail_handle, event_loop, hub)
             .map_err(|e| {
                 error!("failed to start host backend device provider: {}", e);
-                ()
             })
     }
 
@@ -318,7 +317,6 @@ impl EventHandler for ProviderInner {
     fn on_event(&self) -> std::result::Result<(), ()> {
         self.on_event_helper().map_err(|e| {
             error!("host backend device provider failed: {}", e);
-            ()
         })
     }
 }
diff --git a/devices/src/usb/host_backend/host_device.rs b/devices/src/usb/host_backend/host_device.rs
index c73898b..cb4097e 100644
--- a/devices/src/usb/host_backend/host_device.rs
+++ b/devices/src/usb/host_backend/host_device.rs
@@ -526,7 +526,6 @@ impl XhciBackendDevice for HostDevice {
     fn submit_transfer(&mut self, transfer: XhciTransfer) -> std::result::Result<(), ()> {
         self.submit_transfer_helper(transfer).map_err(|e| {
             error!("failed to submit transfer: {}", e);
-            ()
         })
     }
 
diff --git a/devices/src/usb/xhci/command_ring_controller.rs b/devices/src/usb/xhci/command_ring_controller.rs
index c8c059f..83582dd 100644
--- a/devices/src/usb/xhci/command_ring_controller.rs
+++ b/devices/src/usb/xhci/command_ring_controller.rs
@@ -144,7 +144,6 @@ impl CommandRingTrbHandler {
                     )
                     .map_err(|e| {
                         error!("failed to run command completion callback: {}", e);
-                        ()
                     })
                 })
                 .map_err(Error::DisableSlot)
@@ -251,7 +250,6 @@ impl CommandRingTrbHandler {
                     )
                     .map_err(|e| {
                         error!("command completion callback failed: {}", e);
-                        ()
                     })
                 })
                 .map_err(Error::ResetSlot)
@@ -287,7 +285,6 @@ impl CommandRingTrbHandler {
                     )
                     .map_err(|e| {
                         error!("command completion callback failed: {}", e);
-                        ()
                     })
                 })
                 .map_err(Error::StopEndpoint)?;
@@ -390,7 +387,6 @@ impl TransferDescriptorHandler for CommandRingTrbHandler {
         };
         command_result.map_err(|e| {
             error!("command failed: {}", e);
-            ()
         })
     }
 }
diff --git a/devices/src/usb/xhci/transfer_ring_controller.rs b/devices/src/usb/xhci/transfer_ring_controller.rs
index 5bf6024..0b5d3b6 100644
--- a/devices/src/usb/xhci/transfer_ring_controller.rs
+++ b/devices/src/usb/xhci/transfer_ring_controller.rs
@@ -47,7 +47,6 @@ impl TransferDescriptorHandler for TransferRingTrbHandler {
         );
         xhci_transfer.send_to_backend_if_valid().map_err(|e| {
             error!("failed to send transfer to backend: {}", e);
-            ()
         })
     }