add defmt support#77
Merged
Merged
Conversation
thejpster
reviewed
Mar 27, 2026
| /// NOR flash implementations must use an error type implementing this trait. This permits generic | ||
| /// code to extract a generic error kind. | ||
| pub trait NorFlashError: core::fmt::Debug { | ||
| pub trait NorFlashError { |
Member
There was a problem hiding this comment.
I think this bound is still reasonable, and shouldn't be removed.
Contributor
Author
There was a problem hiding this comment.
But I suppose it is always okay to require Debug, yes. I'll add it back
Member
There was a problem hiding this comment.
Ah, I see. So the thinking is you can write T: NorFlashError + core::fmt::Debug where you want to print it to the console, but T: NorFlashError + defmt::Format where you want to log it with defmt? That kind of makes sense, but also all errors should really impl core::fmt::Debug, even in a no_std library. It's just so useful.
thejpster
approved these changes
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not sure if #71 will be updated.