Skip to content

Commit

Permalink
Allow warnings introduced with rust 1.82
Browse files Browse the repository at this point in the history
  • Loading branch information
usbalbin committed Oct 28, 2024
1 parent 9b27404 commit 2a6e22e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/can-echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ fn main() -> ! {
block!(can.transmit(header, &buffer)).unwrap();

loop {
let Ok(rxheader) = block!(can.receive0(&mut buffer));
block!(can.transmit(rxheader.unwrap().to_tx_header(None), &buffer)).unwrap();
#[allow(irrefutable_let_patterns)]
if let Ok(rxheader) = block!(can.receive0(&mut buffer)) {
block!(can.transmit(rxheader.unwrap().to_tx_header(None), &buffer)).unwrap();
}
}
}

0 comments on commit 2a6e22e

Please sign in to comment.