-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement "passthrough" Debug and Display instances for wrappers #858
Conversation
Do you have a short example of where this is useful? |
@jonathanpallant Sure - when writing code that will be used on embedded or desktop, it's pretty common to use a macro adapter like https://github.com/embassy-rs/embassy/blob/ac06ca2fa0aa061a0053336433fa9cbfad5212ca/embassy-sync/src/fmt.rs which switches If the object you are logging is non-defmt (e.g. This PR fixes that issue. Now, something wrapped in |
Oh! Right, that makes perfect sense. |
@Urhengulas any thoughts on this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds useful to me. Thank you for the contribution @wyager!
Implement "passthrough" Debug and Display instances for wrappers
Useful for if you're writing code that switches between defmt::whatever and log::whatever or core::whatever using macros