Skip to content

Commit

Permalink
i missed a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dbydd committed Aug 27, 2024
1 parent 393bf32 commit cfa8271
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ impl<const N: usize> DeviceHandler for Device<N> {

&mut self.endpoints[dci - 1]
}

fn fill_endpoints_with_0(&mut self) {
self.endpoints.fill(Endpoint::new())

Check failure on line 304 in src/context/mod.rs

View workflow job for this annotation

GitHub Actions / build

[clippy] reported by reviewdog 🐶 error: consider adding a `;` to the last statement for consistent formatting --> src/context/mod.rs:304:9 | 304 | self.endpoints.fill(Endpoint::new()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `self.endpoints.fill(Endpoint::new());` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned Raw Output: src/context/mod.rs:304:9:e:error: consider adding a `;` to the last statement for consistent formatting --> src/context/mod.rs:304:9 | 304 | self.endpoints.fill(Endpoint::new()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `self.endpoints.fill(Endpoint::new());` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned __END__
}
}

/// A trait to handle Device Context.
Expand All @@ -324,6 +328,9 @@ pub trait DeviceHandler {
/// This method panics if `dci > 31 || dci == 0`. Call [`DeviceHandler::slot_mut`] if you want
/// a mutable handler of Slot Context.
fn endpoint_mut(&mut self, dci: usize) -> &mut dyn EndpointHandler;

/// fill all endpoints with 0
fn fill_endpoints_with_0(&mut self);
}

/// Slot Context.
Expand Down

0 comments on commit cfa8271

Please sign in to comment.