Skip to content

Commit 111f2bc

Browse files
authored
Bump serde_yaml to 0.9 (#1188)
* 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>
1 parent c30b376 commit 111f2bc

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ kube-derive = { path = "../kube-derive", version = "^0.81.0", default-features =
3434
k8s-openapi = { version = "0.17.0", default-features = false }
3535
serde = { version = "1.0.130", features = ["derive"] }
3636
serde_json = "1.0.68"
37-
serde_yaml = "0.8.21"
37+
serde_yaml = "0.9.19"
3838
tokio = { version = "1.14.0", features = ["full"] }
3939
either = "1.6.1"
4040
schemars = "0.8.6"

examples/crd_derive.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ async fn verify_url_gen() {
218218
fn verify_default() {
219219
let fdef = FooCrd::default();
220220
let ser = serde_yaml::to_string(&fdef).unwrap();
221-
let exp = r#"---
221+
let exp = r#"
222222
apiVersion: clux.dev/v1
223223
kind: Foo
224224
metadata: {}
225225
spec:
226-
name: ""
226+
name: ''
227227
"#;
228-
assert_eq!(exp, ser);
228+
assert_eq!(exp.trim(), ser.trim());
229229
}

kube-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ chrono = { version = "0.4.23", optional = true, default-features = false }
4141
dirs = { package = "dirs-next", optional = true, version = "2.0.0" }
4242
serde = { version = "1.0.130", features = ["derive"] }
4343
serde_json = "1.0.68"
44-
serde_yaml = { version = "0.8.21", optional = true }
44+
serde_yaml = { version = "0.9.19", optional = true }
4545
http = "0.2.5"
4646
http-body = { version = "0.4.2", optional = true }
4747
either = { version = "1.6.1", optional = true }

kube-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ features = ["v1_26"]
4848
[dev-dependencies]
4949
assert-json-diff = "2.0.1"
5050
kube = { path = "../kube", version = "<1.0.0, >=0.53.0" }
51-
serde_yaml = "0.8.23"
51+
serde_yaml = "0.9.19"

kube-derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ proc-macro = true
2727

2828
[dev-dependencies]
2929
serde = { version = "1.0.130", features = ["derive"] }
30-
serde_yaml = "0.8.21"
30+
serde_yaml = "0.9.19"
3131
kube = { path = "../kube", version = "<1.0.0, >=0.61.0", features = ["derive", "client"] }
3232
k8s-openapi = { version = "0.17.0", default-features = false, features = ["v1_26"] }
3333
schemars = { version = "0.8.6", features = ["chrono"] }

kube-derive/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ mod custom_resource;
5454
/// # let client: Client = todo!();
5555
/// let foos: Api<Foo> = Api::default_namespaced(client.clone());
5656
/// let crds: Api<CustomResourceDefinition> = Api::all(client.clone());
57-
/// let crd_yaml = serde_yaml::to_vec(&Foo::crd())?;
58-
/// crds.patch("foos.clux.dev", &PatchParams::apply("myapp"), &Patch::Apply(crd_yaml)).await;
57+
/// crds.patch("foos.clux.dev", &PatchParams::apply("myapp"), &Patch::Apply(Foo::crd())).await;
5958
/// # Ok(())
6059
/// # }
6160
/// ```

0 commit comments

Comments
 (0)