-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stackable-versioned): Add basic handling for enum variants with …
…data (#892) * fix(stackable-versioned): allow various formatting styles for macro in testing regex * fix(stackable-versioned): add k8s-openapi as a dev-dependency * feat(stackable-versioned): basic handling for enum variants with data * chore(stackable-versioned): Update changelog * chore(stackable-versioned): Make udeps happy with k8s-openapi
- Loading branch information
1 parent
cb4218b
commit 244eda7
Showing
6 changed files
with
99 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
12 changes: 12 additions & 0 deletions
12
crates/stackable-versioned-macros/fixtures/inputs/default/enum_data_simple.rs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#[versioned(version(name = "v1alpha1"), version(name = "v1alpha2"))] | ||
// --- | ||
enum Foo { | ||
Foo, | ||
Bar(u32, String), | ||
|
||
#[versioned(added(since = "v1alpha2"))] | ||
Baz { | ||
id: u32, | ||
name: String, | ||
}, | ||
} |
31 changes: 31 additions & 0 deletions
31
...es/snapshots/stackable_versioned_macros__test__default_snapshots@enum_data_simple.rs.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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