File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,10 @@ pub trait Channel: private::Channel {
333
333
1 => BITS8 ,
334
334
2 => BITS16 ,
335
335
4 => BITS32 ,
336
- s => crate :: panic!( "unsupported word size: {:?}" , s) ,
336
+ #[ cfg( not( feature = "defmt" ) ) ]
337
+ s => core:: panic!( "unsupported word size: {:?}" , s) ,
338
+ #[ cfg( feature = "defmt" ) ]
339
+ _ => defmt:: panic!( "unsupported word size" ) ,
337
340
} ;
338
341
339
342
self . ch ( ) . cr . modify ( |_, w| {
Original file line number Diff line number Diff line change @@ -161,7 +161,9 @@ pub mod watchdog;
161
161
162
162
cfg_if ! {
163
163
if #[ cfg( feature = "defmt" ) ] {
164
+ #[ allow( unused_imports) ]
164
165
pub ( crate ) use defmt:: { assert, panic, unreachable, unwrap} ;
166
+ #[ allow( unused_imports) ]
165
167
pub ( crate ) use macros:: expect;
166
168
167
169
mod macros {
@@ -177,7 +179,9 @@ cfg_if! {
177
179
pub ( crate ) use expect_wrapper as expect;
178
180
}
179
181
} else {
182
+ #[ allow( unused_imports) ]
180
183
pub ( crate ) use core:: { assert, panic, unreachable} ;
184
+ #[ allow( unused_imports) ]
181
185
pub ( crate ) use macros:: { unwrap, expect} ;
182
186
183
187
mod macros {
You can’t perform that action at this time.
0 commit comments