diff options
author | Brian Cully <bjc@kublai.com> | 2019-09-09 21:19:01 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-09-09 21:19:01 -0400 |
commit | 58a268850f34b660c9c71a3442b7cc70d21944da (patch) | |
tree | eb730c6f5590a1825aae0651c5bd0f8835806f18 /src/lib.rs | |
parent | 27177f3d9b82c51a1131784123e9492f6d852c45 (diff) | |
download | atsamd-usb-host-58a268850f34b660c9c71a3442b7cc70d21944da.tar.gz atsamd-usb-host-58a268850f34b660c9c71a3442b7cc70d21944da.zip |
Clippy.
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -82,7 +82,7 @@ impl DeviceTable { unsafe { mem::transmute(devs) } }; - Self { tbl: tbl } + Self { tbl } } /// Allocate a device with the next available address. @@ -101,8 +101,7 @@ impl DeviceTable { /// Remove the device at address `addr`. fn remove(&mut self, addr: u8) -> Option<Device> { - let v = core::mem::replace(&mut self.tbl[addr as usize], None); - v + core::mem::replace(&mut self.tbl[addr as usize], None) } } @@ -136,6 +135,7 @@ impl<'a, F> SAMDHost<'a, F> where F: Fn() -> usize, { + #[allow(clippy::too_many_arguments)] pub fn new( usb: USB, sof_pin: gpio::Pa23<Input<Floating>>, @@ -150,7 +150,7 @@ where let (eventr, mut eventw) = unsafe { EVENTS.split() }; let mut rc = Self { - usb: usb, + usb, events: eventr, task_state: TaskState::Detached(DetachedState::Initialize), @@ -164,7 +164,7 @@ where _dp_pad: dp_pin.into_function_g(port), host_enable_pin: None, - millis: millis, + millis, }; if let Some(he_pin) = host_enable_pin { @@ -375,7 +375,7 @@ where _ => 8, }; let mut a0ep0 = Addr0EP0 { - max_packet_size: max_packet_size, + max_packet_size, in_toggle: true, out_toggle: true, }; |