diff --git a/Cargo.toml b/Cargo.toml index d8d1d23f..c8afd181 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ default-features = false version = "1.0.100" [dependencies.defmt] -version = "0.3.0" +version = "0.3.5" default-features = false optional = true diff --git a/src/de/mod.rs b/src/de/mod.rs index c04d7379..613323bc 100644 --- a/src/de/mod.rs +++ b/src/de/mod.rs @@ -75,7 +75,9 @@ pub enum Error { /// Error with a custom message that was preserved. #[cfg(feature = "custom-error-messages")] - CustomErrorWithMessage(heapless::String<64>), + CustomErrorWithMessage( + #[cfg_attr(feature = "defmt", defmt(Debug2Format))] heapless::String<64>, + ), } impl serde::de::StdError for Error {}