diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-08-29 23:42:59 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-29 23:42:59 +0000 |
| commit | fdb2c4946aeef968704c358fb52d5fea69e80dcc (patch) | |
| tree | 223a503d25c07dc99220f860b587c1ce2a0e0012 /cyw43 | |
| parent | 40b576584e96fb44ead4e73b30b654b04c6f1128 (diff) | |
| parent | 5e613d9abbb945e7fc7d4c895d645bfad6a3d2c8 (diff) | |
Merge pull request #1843 from embassy-rs/fmt-sync
Sync all fmt.rs files.
Diffstat (limited to 'cyw43')
| -rw-r--r-- | cyw43/src/fmt.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/cyw43/src/fmt.rs b/cyw43/src/fmt.rs index 9534c101c..78e583c1c 100644 --- a/cyw43/src/fmt.rs +++ b/cyw43/src/fmt.rs | |||
| @@ -83,14 +83,17 @@ macro_rules! todo { | |||
| 83 | }; | 83 | }; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | #[cfg(not(feature = "defmt"))] | ||
| 86 | macro_rules! unreachable { | 87 | macro_rules! unreachable { |
| 87 | ($($x:tt)*) => { | 88 | ($($x:tt)*) => { |
| 88 | { | 89 | ::core::unreachable!($($x)*) |
| 89 | #[cfg(not(feature = "defmt"))] | 90 | }; |
| 90 | ::core::unreachable!($($x)*); | 91 | } |
| 91 | #[cfg(feature = "defmt")] | 92 | |
| 92 | ::defmt::unreachable!($($x)*); | 93 | #[cfg(feature = "defmt")] |
| 93 | } | 94 | macro_rules! unreachable { |
| 95 | ($($x:tt)*) => { | ||
| 96 | ::defmt::unreachable!($($x)*) | ||
| 94 | }; | 97 | }; |
| 95 | } | 98 | } |
| 96 | 99 | ||
| @@ -226,7 +229,8 @@ impl<T, E> Try for Result<T, E> { | |||
| 226 | } | 229 | } |
| 227 | } | 230 | } |
| 228 | 231 | ||
| 229 | pub struct Bytes<'a>(pub &'a [u8]); | 232 | #[allow(unused)] |
| 233 | pub(crate) struct Bytes<'a>(pub &'a [u8]); | ||
| 230 | 234 | ||
| 231 | impl<'a> Debug for Bytes<'a> { | 235 | impl<'a> Debug for Bytes<'a> { |
| 232 | fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | 236 | fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { |
