Skip to content

Conversation

sunsided
Copy link

This adds support for defmt via the defmt feature flag. This mainly brings defmt to the error types, but also adds it to Orientation.

To improve documentation, I added a rustdoc conditional feature for highlighting gated feature. All of the defmt::Format implementations could have been simply derived with a cfg_attr, but it doesn't work smoothly with the #[cfg_attr(docsrs, doc(...))] annotation.

To test documentation, you can run:

RUSTDOCFLAGS='--cfg docsrs' cargo +nightly doc --open --all-features

It should render like this:

image

@sunsided
Copy link
Author

Since you're using micromath, I added a PR for defmt support there as well (tarcieri/micromath#108). If that happens, I'll come back and forward the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant