aboutsummaryrefslogtreecommitdiff
path: root/embassy-net-adin1110
diff options
context:
space:
mode:
authorTarun Singh <[email protected]>2024-07-17 17:05:52 -0400
committerTarun Singh <[email protected]>2024-07-17 17:05:52 -0400
commita716a3f006e439bbd9d11ab858d8ee4a93ec48f8 (patch)
tree49866d4a7beb26b52c294351432369947a03a12e /embassy-net-adin1110
parente1e99879a63408d17d0c947ca65fbeea827467c9 (diff)
Reduced define for 'unreachable!' to a single macro rule
Diffstat (limited to 'embassy-net-adin1110')
-rw-r--r--embassy-net-adin1110/src/fmt.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/embassy-net-adin1110/src/fmt.rs b/embassy-net-adin1110/src/fmt.rs
index 35b929fde..8ca61bc39 100644
--- a/embassy-net-adin1110/src/fmt.rs
+++ b/embassy-net-adin1110/src/fmt.rs
@@ -90,19 +90,15 @@ macro_rules! todo {
90 }; 90 };
91} 91}
92 92
93#[cfg(not(feature = "defmt"))]
94#[collapse_debuginfo(yes)]
95macro_rules! unreachable {
96 ($($x:tt)*) => {
97 ::core::unreachable!($($x)*)
98 };
99}
100
101#[cfg(feature = "defmt")]
102#[collapse_debuginfo(yes)] 93#[collapse_debuginfo(yes)]
103macro_rules! unreachable { 94macro_rules! unreachable {
104 ($($x:tt)*) => { 95 ($($x:tt)*) => {
105 ::defmt::unreachable!($($x)*) 96 {
97 #[cfg(not(feature = "defmt"))]
98 ::core::unreachable!($($x)*);
99 #[cfg(feature = "defmt")]
100 ::defmt::unreachable!($($x)*);
101 }
106 }; 102 };
107} 103}
108 104