diff options
| -rw-r--r-- | embassy/src/util/mpsc.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/embassy/src/util/mpsc.rs b/embassy/src/util/mpsc.rs index 364b98aa4..4257ecd40 100644 --- a/embassy/src/util/mpsc.rs +++ b/embassy/src/util/mpsc.rs | |||
| @@ -441,14 +441,10 @@ impl<T> fmt::Display for TrySendError<T> { | |||
| 441 | #[cfg(feature = "defmt")] | 441 | #[cfg(feature = "defmt")] |
| 442 | impl<T> defmt::Format for TrySendError<T> { | 442 | impl<T> defmt::Format for TrySendError<T> { |
| 443 | fn format(&self, fmt: defmt::Formatter<'_>) { | 443 | fn format(&self, fmt: defmt::Formatter<'_>) { |
| 444 | defmt::write!( | 444 | match self { |
| 445 | fmt, | 445 | TrySendError::Full(..) => defmt::write!(fmt, "no available capacity"), |
| 446 | "{}", | 446 | TrySendError::Closed(..) => defmt::write!(fmt, "channel closed"), |
| 447 | match self { | 447 | } |
| 448 | TrySendError::Full(..) => "no available capacity", | ||
| 449 | TrySendError::Closed(..) => "channel closed", | ||
| 450 | } | ||
| 451 | ) | ||
| 452 | } | 448 | } |
| 453 | } | 449 | } |
| 454 | 450 | ||
