Fix clippy warnings

This commit is contained in:
Jan Niehusmann 2022-02-26 16:27:24 +00:00 committed by 9names
parent 7750781650
commit 021e942e47

View file

@ -259,8 +259,7 @@ impl Inner {
let ep = self let ep = self
.in_endpoints .in_endpoints
.get_mut(index) .get_mut(index)
.map(Option::as_mut) .and_then(Option::as_mut)
.flatten()
.ok_or(UsbError::InvalidEndpoint)?; .ok_or(UsbError::InvalidEndpoint)?;
let buf_control = &self.ctrl_dpram.ep_buffer_control[index * 2]; let buf_control = &self.ctrl_dpram.ep_buffer_control[index * 2];
@ -289,8 +288,7 @@ impl Inner {
let ep = self let ep = self
.out_endpoints .out_endpoints
.get_mut(index) .get_mut(index)
.map(Option::as_mut) .and_then(Option::as_mut)
.flatten()
.ok_or(UsbError::InvalidEndpoint)?; .ok_or(UsbError::InvalidEndpoint)?;
let buf_control = &self.ctrl_dpram.ep_buffer_control[index * 2 + 1]; let buf_control = &self.ctrl_dpram.ep_buffer_control[index * 2 + 1];