Skip to content

feat(stackable-versioned): Generate downgrade From impls #1033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
5 changes: 5 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/k8s-version/src/api_version/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl<'de> Deserialize<'de> for ApiVersion {
{
struct ApiVersionVisitor;

impl<'de> Visitor<'de> for ApiVersionVisitor {
impl Visitor<'_> for ApiVersionVisitor {
type Value = ApiVersion;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion crates/k8s-version/src/level/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl<'de> Deserialize<'de> for Level {
{
struct LevelVisitor;

impl<'de> Visitor<'de> for LevelVisitor {
impl Visitor<'_> for LevelVisitor {
type Value = Level;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion crates/k8s-version/src/version/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl<'de> Deserialize<'de> for Version {
{
struct VersionVisitor;

impl<'de> Visitor<'de> for VersionVisitor {
impl Visitor<'_> for VersionVisitor {
type Value = Version;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
3 changes: 2 additions & 1 deletion crates/stackable-versioned-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ quote.workspace = true
[dev-dependencies]
# Only needed for doc tests / examples
stackable-versioned = { path = "../stackable-versioned", features = ["k8s"] }
k8s-openapi.workspace = true

k8s-openapi.workspace = true
kube.workspace = true
Copy link
Member

Choose a reason for hiding this comment

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

TODO: Check if this is needed

insta.workspace = true
prettyplease.workspace = true
regex.workspace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ struct Foo {
// This tests two additional things:
// - that both unquoted and quoted usage works
// - that the renamed name does get picked up correctly by the conversion function
changed(since = "v1", from_type = "u16", from_name = "bar", convert_with = u16_to_u32),
changed(since = "v2", from_type = "u32", convert_with = "u32_to_u64")
changed(since = "v1", from_type = "u16", from_name = "bar", upgrade_with = u16_to_u32),
changed(since = "v2", from_type = "u32", upgrade_with = "u32_to_u64")
)]
baz: u64,
}

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.

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.

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

Loading
Loading