Skip to content

Commit 17fb066

Browse files
authored
Merge pull request #146 from Tosainu/fix-printing-error-with-defmt
Fix compilation error when printing `Error` with defmt
2 parents 5b4109c + 8daf104 commit 17fb066

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/error.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ pub enum Error<'a> {
2020
/// An unknown [`GnssType`] was found in the NMEA message.
2121
UnknownGnssType(&'a str),
2222
/// The sentence could not be parsed because its format was invalid.
23-
#[cfg_attr(feature = "defmt-03", defmt(defmt::Debug2Format))]
24-
ParsingError(nom::Err<nom::error::Error<&'a str>>),
23+
ParsingError(
24+
#[cfg_attr(feature = "defmt-03", defmt(Debug2Format))] nom::Err<nom::error::Error<&'a str>>,
25+
),
2526
/// The sentence was too long to be parsed, our current limit is `SENTENCE_MAX_LEN` characters.
2627
SentenceLength(usize),
2728
/// Parameter was too long to fit into fixed ArrayString.

0 commit comments

Comments
 (0)