From 961bc5d4f2519994f13fa9318945dfbd8f1ff777 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Thu, 1 Aug 2024 18:09:50 -0700 Subject: [PATCH] simplify match branches in get_fifo_state() --- src/radio/rf24/fifo.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/radio/rf24/fifo.rs b/src/radio/rf24/fifo.rs index dd1ef6d..d96cce0 100644 --- a/src/radio/rf24/fifo.rs +++ b/src/radio/rf24/fifo.rs @@ -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), } } }