Skip to content

logging: feature-gate Inner enum variants for lpuart/usbd#195

Merged
mciantyre merged 1 commit into
imxrt-rs:mainfrom
tacertain:main
Mar 8, 2026
Merged

logging: feature-gate Inner enum variants for lpuart/usbd#195
mciantyre merged 1 commit into
imxrt-rs:mainfrom
tacertain:main

Conversation

@tacertain

Copy link
Copy Markdown
Contributor

The Inner enum and its From impls/match arms referenced lpuart::Backend and usbd::Backend unconditionally, causing compilation errors when only one backend feature (e.g. lpuart but not usbd) was enabled.

Add #[cfg(feature = ...)] gates to each variant, From impl, and match arm so the crate compiles with any valid subset of backend features.

The Inner enum and its From impls/match arms referenced lpuart::Backend
and usbd::Backend unconditionally, causing compilation errors when only
one backend feature (e.g. lpuart but not usbd) was enabled.

Add #[cfg(feature = ...)] gates to each variant, From impl, and match
arm so the crate compiles with any valid subset of backend features.

@mciantyre mciantyre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. And thanks for documenting the problem! I included some CI tests so we can catch that going forward.

@mciantyre mciantyre merged commit f98f3e1 into imxrt-rs:main Mar 8, 2026
43 checks passed
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.

2 participants