From 80e71c2c6431cb8f146d9fce5b3385b0ee1a1ef2 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Sun, 7 Apr 2024 14:50:19 +0200 Subject: [PATCH 1/2] Bump base64 to v0.22 --- Cargo.lock | 14 ++++++++++---- serde_with/Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b1c51b81..ca223087 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -60,9 +60,15 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" [[package]] name = "basic-toml" @@ -409,7 +415,7 @@ checksum = "2a071f4f7efc9a9118dfb627a0a94ef247986e1ab8606a4c806ae2b3aa3b6978" dependencies = [ "ahash", "anyhow", - "base64 0.21.5", + "base64 0.21.7", "bytecount", "fancy-regex", "fraction", @@ -840,7 +846,7 @@ dependencies = [ name = "serde_with" version = "3.7.0" dependencies = [ - "base64 0.21.5", + "base64 0.22.0", "chrono", "doc-comment", "document-features", diff --git a/serde_with/Cargo.toml b/serde_with/Cargo.toml index 9edc1731..74089b0f 100644 --- a/serde_with/Cargo.toml +++ b/serde_with/Cargo.toml @@ -121,7 +121,7 @@ time_0_3 = ["dep:time_0_3"] # When adding new optional dependencies, update the documentation in feature-flags.md [dependencies] -base64 = {version = "0.21.0", optional = true, default-features = false} +base64 = {version = "0.22.0", optional = true, default-features = false} chrono_0_4 = {package = "chrono", version = "0.4.20", optional = true, default-features = false, features = ["serde"]} doc-comment = {version = "0.3.3", optional = true} document-features = {version = "0.2.7", optional = true} From ee79631002f6e76d0b078d8f3e25d952dbb5058b Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Sun, 7 Apr 2024 14:57:17 +0200 Subject: [PATCH 2/2] Update the error messages produces by base64 --- serde_with/tests/base64.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serde_with/tests/base64.rs b/serde_with/tests/base64.rs index cb20fadc..5a58afa5 100644 --- a/serde_with/tests/base64.rs +++ b/serde_with/tests/base64.rs @@ -38,7 +38,7 @@ fn base64_vec() { check_error_deserialization::( r#"["0"]"#, - expect!["Encoded text cannot have a 6-bit remainder. at line 1 column 4"], + expect!["Invalid input length: 1 at line 1 column 4"], ); check_error_deserialization::( r#"["zz"]"#,