From cb973c94113672d5f3d6bda7044c3d48c515336c Mon Sep 17 00:00:00 2001 From: Ian McIntyre Date: Tue, 14 Mar 2023 08:59:26 -0400 Subject: [PATCH] Address latest clippy warnings cargo clippy --fix && cargo fmt --- src/driver.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/driver.rs b/src/driver.rs index e2db43c..1e2a6da 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -24,7 +24,7 @@ fn ctrl_ep0_in() -> EndpointAddress { } /// USB low / full / high speed setting. -#[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] pub enum Speed { /// Throttle to low / full speeds. /// @@ -35,15 +35,10 @@ pub enum Speed { /// /// A high-speed device can still interface a low / full /// speed host, so use this setting for the most flexibility. + #[default] High, } -impl Default for Speed { - fn default() -> Self { - Speed::High - } -} - /// A USB driver /// /// After you allocate a `Driver` with [`new()`](Driver::new), you must