Refactor to allow defmt to intern strings.
This commit is contained in:
parent
4d3c07f71b
commit
7ca745a5c0
@ -441,14 +441,10 @@ impl<T> fmt::Display for TrySendError<T> {
|
|||||||
#[cfg(feature = "defmt")]
|
#[cfg(feature = "defmt")]
|
||||||
impl<T> defmt::Format for TrySendError<T> {
|
impl<T> defmt::Format for TrySendError<T> {
|
||||||
fn format(&self, fmt: defmt::Formatter<'_>) {
|
fn format(&self, fmt: defmt::Formatter<'_>) {
|
||||||
defmt::write!(
|
|
||||||
fmt,
|
|
||||||
"{}",
|
|
||||||
match self {
|
match self {
|
||||||
TrySendError::Full(..) => "no available capacity",
|
TrySendError::Full(..) => defmt::write!(fmt, "no available capacity"),
|
||||||
TrySendError::Closed(..) => "channel closed",
|
TrySendError::Closed(..) => defmt::write!(fmt, "channel closed"),
|
||||||
}
|
}
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user