Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -280,19 +280,19 @@ impl Struct {
impl #enum_ident {
pub fn as_version_str(&self) -> &str {
match self {
#(#variant_idents => #variant_strings),*
#(#enum_ident::#variant_idents => #variant_strings),*
}
}

pub fn as_api_version_str(&self) -> &str {
match self {
#(#variant_idents => #api_versions),*
#(#enum_ident::#variant_idents => #api_versions),*
}
}

pub fn from_api_version(api_version: &str) -> Result<Self, #unknown_desired_api_version_error> {
match api_version {
#(#api_versions => Ok(Self::#variant_idents)),*,
#(#api_versions => Ok(#enum_ident::#variant_idents)),*,
_ => Err(#unknown_desired_api_version_error {
api_version: api_version.to_owned(),
}),
Expand Down
18 changes: 9 additions & 9 deletions ...oned-macros/tests/snapshots/[email protected]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions ...ned-macros/tests/snapshots/[email protected]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/stackable-versioned/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ All notable changes to this project will be documented in this file.

### Fixed

- Fix incorrectly generated match arms for the version enum ([#1065]).
- Fix regression introduced in [#1033]. The `#[kube(status = ...)]` attribute is generated correctly
again ([#1046]).
- Correctly handle fields added in later versions ([#1031]).
Expand All @@ -55,6 +56,7 @@ All notable changes to this project will be documented in this file.
[#1050]: https://github.com/stackabletech/operator-rs/pull/1050
[#1059]: https://github.com/stackabletech/operator-rs/pull/1059
[#1061]: https://github.com/stackabletech/operator-rs/pull/1061
[#1065]: https://github.com/stackabletech/operator-rs/pull/1065

## [0.7.1] - 2025-04-02

Expand Down
Loading