From 3a5bf00e6144e0f877b1b8d96c2883037ca8c0aa Mon Sep 17 00:00:00 2001 From: Mike Walters Date: Mon, 8 Jan 2024 13:36:37 +0000 Subject: [PATCH] Clippy fixes --- src/capture.rs | 3 --- src/ui.rs | 2 +- src/usb.rs | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/capture.rs b/src/capture.rs index 4f3b40c4..f9dbe8ed 100644 --- a/src/capture.rs +++ b/src/capture.rs @@ -1707,9 +1707,7 @@ mod tests { pub mod prelude { pub use super::{ - create_capture, create_endpoint, - CaptureReader, CaptureWriter, CaptureError, Device, @@ -1719,7 +1717,6 @@ pub mod prelude { EndpointId, EndpointType, EndpointState, - EndpointReader, EndpointWriter, EndpointTransactionId, EndpointTransferId, diff --git a/src/ui.rs b/src/ui.rs index 110a804f..53b82c30 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -181,7 +181,7 @@ impl DeviceSelector { ) } let no_speeds = vec![]; - let speed_strings = self.dev_speeds.get(0).unwrap_or(&no_speeds); + let speed_strings = self.dev_speeds.first().unwrap_or(&no_speeds); self.replace_dropdown(&self.dev_dropdown, &self.dev_strings); self.replace_dropdown(&self.speed_dropdown, speed_strings); let available = self.device_available(); diff --git a/src/usb.rs b/src/usb.rs index 8a442206..cffecdf3 100644 --- a/src/usb.rs +++ b/src/usb.rs @@ -911,7 +911,6 @@ pub mod prelude { SetupFields, SplitFields, StartComplete, - Speed, Direction, EndpointAddr, StandardRequest, @@ -920,7 +919,6 @@ pub mod prelude { DescriptorType, DeviceDescriptor, ConfigDescriptor, - InterfaceDescriptor, EndpointDescriptor, Configuration, Interface,