Skip to content

Drop #[non_exhaustive] from SpecVersion#749

Merged
Shnatsel merged 2 commits intoCycloneDX:mainfrom
Shnatsel:exhaustive-enum
Aug 6, 2024
Merged

Drop #[non_exhaustive] from SpecVersion#749
Shnatsel merged 2 commits intoCycloneDX:mainfrom
Shnatsel:exhaustive-enum

Conversation

@Shnatsel
Copy link
Contributor

Adding every new spec version required an API break anyway, so there isn't any benefit to having #[non_exhaustive].

However, this #[non_exhaustive] has caused serious real-world bugs:
#722
#723

So drop it now that we're making a semver-breaking release anyway.

Also drop #[repr(u16)] because it fits into a u8 perfectly fine, and the layout isn't relied on anywhere as far as I can tell. This is semver-breaking too, which is why I'm doing it now.

Shnatsel added 2 commits July 17, 2024 03:46
Signed-off-by: Sergey "Shnatsel" Davidoff <shnatsel@gmail.com>
Signed-off-by: Sergey "Shnatsel" Davidoff <shnatsel@gmail.com>
@Shnatsel Shnatsel requested a review from a team as a code owner July 17, 2024 03:28
@Shnatsel Shnatsel merged commit 1e66664 into CycloneDX:main Aug 6, 2024
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