diff --git a/src/defmt.rs b/src/defmt.rs index 014faf8c37..94c3c068bc 100644 --- a/src/defmt.rs +++ b/src/defmt.rs @@ -3,8 +3,8 @@ use crate::ArrayLength; use crate::Vec; -use defmt::Formatter; use as_slice::AsSlice; +use defmt::Formatter; impl defmt::Format for Vec where @@ -49,7 +49,7 @@ mod tests { let index = defmt::export::fetch_string_index(); let mut f = defmt::InternalFormatter::new(); - let g = defmt::Formatter{inner: &mut f}; + let g = defmt::Formatter { inner: &mut f }; val.format(g); f.finalize(); } diff --git a/src/lib.rs b/src/lib.rs index d222743a02..c566c41b41 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -99,6 +99,8 @@ mod de; mod ser; pub mod binary_heap; +#[cfg(feature = "defmt-impl")] +mod defmt; pub mod i; #[cfg(all(has_cas, feature = "cas"))] pub mod mpmc; @@ -106,8 +108,6 @@ pub mod mpmc; pub mod pool; #[cfg(has_atomics)] pub mod spsc; -#[cfg(feature = "defmt-impl")] -mod defmt; #[cfg(feature = "ufmt-impl")] mod ufmt;