aboutsummaryrefslogtreecommitdiff
path: root/cyw43/src/fmt.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-08-30 01:37:18 +0200
committerDario Nieuwenhuis <[email protected]>2023-08-30 01:37:18 +0200
commit5e613d9abbb945e7fc7d4c895d645bfad6a3d2c8 (patch)
tree223a503d25c07dc99220f860b587c1ce2a0e0012 /cyw43/src/fmt.rs
parent40b576584e96fb44ead4e73b30b654b04c6f1128 (diff)
Sync all fmt.rs files.
Diffstat (limited to 'cyw43/src/fmt.rs')
-rw-r--r--cyw43/src/fmt.rs18
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"))]
86macro_rules! unreachable { 87macro_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 } 94macro_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
229pub struct Bytes<'a>(pub &'a [u8]); 232#[allow(unused)]
233pub(crate) struct Bytes<'a>(pub &'a [u8]);
230 234
231impl<'a> Debug for Bytes<'a> { 235impl<'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 {