Skip to content

Commit

Permalink
simplify match branches in get_fifo_state()
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Aug 2, 2024
1 parent f0d0fb2 commit 961bc5d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/radio/rf24/fifo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ where
let offset = about_tx as u8 * 4;
let status = (self._buf[1] & (3 << offset)) >> offset;
match status {
0 => Ok(FifoState::Occupied),
1 => Ok(FifoState::Empty),
2 => Ok(FifoState::Full),
_ => unreachable!(),
_ => Ok(FifoState::Occupied),
}
}
}
Expand Down

0 comments on commit 961bc5d

Please sign in to comment.