Skip to content

Commit

Permalink
Fix cargo format failure in timer.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
marnovandermaas committed Oct 16, 2023
1 parent d642440 commit 765b8d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sw/rust/ibex-demo-system-hal/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ impl<U: Deref<Target = pac::timer0::RegisterBlock>> timer::CountDown for CountDo
}

fn wait(&mut self) -> nb::Result<(), void::Void> {
let Some(timeout) = self.timeout else { panic!("Countdown not started"); };
let Some(timeout) = self.timeout else {
panic!("Countdown not started");
};

if self.timer.get_counter() < timeout {
return Err(nb::Error::WouldBlock);
Expand Down

0 comments on commit 765b8d6

Please sign in to comment.