Skip to content

Commit

Permalink
Bump serde_yaml to 0.9 (#1188)
Browse files Browse the repository at this point in the history
* Bump `serde_yaml` to 0.9

Closes #980

Signed-off-by: clux <sszynrae@gmail.com>

* minor serialization changes + fn removal in serde_yaml

Signed-off-by: clux <sszynrae@gmail.com>

---------

Signed-off-by: clux <sszynrae@gmail.com>
  • Loading branch information
clux committed Apr 8, 2023
1 parent c30b376 commit 111f2bc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ kube-derive = { path = "../kube-derive", version = "^0.81.0", default-features =
k8s-openapi = { version = "0.17.0", default-features = false }
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.68"
serde_yaml = "0.8.21"
serde_yaml = "0.9.19"
tokio = { version = "1.14.0", features = ["full"] }
either = "1.6.1"
schemars = "0.8.6"
Expand Down
6 changes: 3 additions & 3 deletions examples/crd_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ async fn verify_url_gen() {
fn verify_default() {
let fdef = FooCrd::default();
let ser = serde_yaml::to_string(&fdef).unwrap();
let exp = r#"---
let exp = r#"
apiVersion: clux.dev/v1
kind: Foo
metadata: {}
spec:
name: ""
name: ''
"#;
assert_eq!(exp, ser);
assert_eq!(exp.trim(), ser.trim());
}
2 changes: 1 addition & 1 deletion kube-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ chrono = { version = "0.4.23", optional = true, default-features = false }
dirs = { package = "dirs-next", optional = true, version = "2.0.0" }
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.68"
serde_yaml = { version = "0.8.21", optional = true }
serde_yaml = { version = "0.9.19", optional = true }
http = "0.2.5"
http-body = { version = "0.4.2", optional = true }
either = { version = "1.6.1", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion kube-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ features = ["v1_26"]
[dev-dependencies]
assert-json-diff = "2.0.1"
kube = { path = "../kube", version = "<1.0.0, >=0.53.0" }
serde_yaml = "0.8.23"
serde_yaml = "0.9.19"
2 changes: 1 addition & 1 deletion kube-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ proc-macro = true

[dev-dependencies]
serde = { version = "1.0.130", features = ["derive"] }
serde_yaml = "0.8.21"
serde_yaml = "0.9.19"
kube = { path = "../kube", version = "<1.0.0, >=0.61.0", features = ["derive", "client"] }
k8s-openapi = { version = "0.17.0", default-features = false, features = ["v1_26"] }
schemars = { version = "0.8.6", features = ["chrono"] }
Expand Down
3 changes: 1 addition & 2 deletions kube-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ mod custom_resource;
/// # let client: Client = todo!();
/// let foos: Api<Foo> = Api::default_namespaced(client.clone());
/// let crds: Api<CustomResourceDefinition> = Api::all(client.clone());
/// let crd_yaml = serde_yaml::to_vec(&Foo::crd())?;
/// crds.patch("foos.clux.dev", &PatchParams::apply("myapp"), &Patch::Apply(crd_yaml)).await;
/// crds.patch("foos.clux.dev", &PatchParams::apply("myapp"), &Patch::Apply(Foo::crd())).await;
/// # Ok(())
/// # }
/// ```
Expand Down

0 comments on commit 111f2bc

Please sign in to comment.