mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 21:05:35 +01:00
Cleanup common code and clippy fixes
This commit is contained in:
parent
15d788b7fa
commit
d0c5126960
3 changed files with 8 additions and 32 deletions
|
|
@ -142,8 +142,8 @@ where
|
|||
{
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
match self {
|
||||
TrySendError::NoReceiver(v) => write!(f, "NoReceiver({:?})", v),
|
||||
TrySendError::Full(v) => write!(f, "Full({:?})", v),
|
||||
TrySendError::NoReceiver(v) => write!(f, "NoReceiver({v:?})"),
|
||||
TrySendError::Full(v) => write!(f, "Full({v:?})"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -401,12 +401,10 @@ impl<'a, T, const N: usize> Receiver<'a, T, N> {
|
|||
}
|
||||
|
||||
Ok(r)
|
||||
} else if self.is_closed() {
|
||||
Err(ReceiveError::NoSender)
|
||||
} else {
|
||||
if self.is_closed() {
|
||||
Err(ReceiveError::NoSender)
|
||||
} else {
|
||||
Err(ReceiveError::Empty)
|
||||
}
|
||||
Err(ReceiveError::Empty)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue