From eeb7193dd10a361faba7e230123614e2110e4a14 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 2 Jul 2024 15:26:12 +0200 Subject: [PATCH 1/6] update dependencies --- Cargo.toml | 10 +++++----- derive/Cargo.toml | 2 +- examples/actix_web_server/Cargo.toml | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fb43698..1fbc857 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,11 @@ edition = "2021" [dependencies] serde_json = { version = "1.0", optional = true } serde-cs = { version = "0.2.4", optional = true } -actix-web = { version = "4.3.0", default-features = false, optional = true } -futures = { version = "0.3.25", optional = true } +actix-web = { version = "4.8.0", default-features = false, optional = true } +futures = { version = "0.3.30", optional = true } deserr-internal = { version = "=0.6.0", path = "derive" } strsim = "0.10.0" -actix-http = { version = "3.3.0", optional = true } +actix-http = { version = "3.8.0", optional = true } actix-utils = { version = "3.0.1", optional = true } serde_urlencoded = "0.7.1" @@ -29,11 +29,11 @@ actix-web = ["dep:actix-web", "futures", "actix-http", "actix-utils"] [dev-dependencies] automod = "1.0" -insta = { version = "1.23.0", features = ["json"] } +insta = { version = "1.39.0", features = ["json"] } rustversion = "1.0" serde = { version = "1.0", features = ["derive"] } serde_derive = "1.0" -trybuild = { version = "1.0.49", features = ["diff"] } +trybuild = { version = "1.0.96", features = ["diff"] } [workspace] members = ["derive", "examples/*"] diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 504f68b..19b760a 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -12,7 +12,7 @@ proc-macro = true [dependencies] proc-macro2 = "1.0" -quote = "1.0.2" +quote = "1.0.36" syn = { version = "2.0", features=["extra-traits", "parsing"]} convert_case = "0.6.0" diff --git a/examples/actix_web_server/Cargo.toml b/examples/actix_web_server/Cargo.toml index e090358..f5921eb 100644 --- a/examples/actix_web_server/Cargo.toml +++ b/examples/actix_web_server/Cargo.toml @@ -6,13 +6,13 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -actix-http = { version = "3.2.2", default-features = false, features = ["compress-brotli", "compress-gzip", "rustls"] } -actix-web = { version = "4.2.1", default-features = false, features = ["macros", "compress-brotli", "compress-gzip", "cookies", "rustls"] } -anyhow = "1.0.68" +actix-http = { version = "3.8.0", default-features = false, features = ["compress-brotli", "compress-gzip", "rustls"] } +actix-web = { version = "4.8.0", default-features = false, features = ["macros", "compress-brotli", "compress-gzip", "cookies", "rustls"] } +anyhow = "1.0.86" deserr = { path = "../../", features = ["actix-web"] } -env_logger = "0.10.0" -futures = "0.3.25" -futures-util = "0.3.25" -log = "0.4.17" -serde = { version = "1.0.152", features = ["derive"] } -serde_json = "1.0.91" +env_logger = "0.10.2" +futures = "0.3.30" +futures-util = "0.3.30" +log = "0.4.22" +serde = { version = "1.0.203", features = ["derive"] } +serde_json = "1.0.120" From 643a3a7fc83baeec3e764929b8acbe348c689b08 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 2 Jul 2024 15:27:25 +0200 Subject: [PATCH 2/6] make insta happy --- examples/actix_web_server/Cargo.toml | 2 +- examples/implements_deserr_manually.rs | 4 +- src/errors/json.rs | 84 ++++++++++++------------- src/errors/query_params.rs | 84 ++++++++++++------------- tests/attributes/default.rs | 4 +- tests/attributes/deny_unknown_fields.rs | 8 +-- tests/attributes/error.rs | 6 +- tests/attributes/missing_field_error.rs | 6 +- tests/attributes/rename_all.rs | 14 ++--- tests/attributes/tag.rs | 6 +- tests/attributes/try_from.rs | 8 +-- tests/attributes/validate.rs | 4 +- tests/char-error-message.rs | 6 +- 13 files changed, 118 insertions(+), 118 deletions(-) diff --git a/examples/actix_web_server/Cargo.toml b/examples/actix_web_server/Cargo.toml index f5921eb..cc41682 100644 --- a/examples/actix_web_server/Cargo.toml +++ b/examples/actix_web_server/Cargo.toml @@ -10,7 +10,7 @@ actix-http = { version = "3.8.0", default-features = false, features = ["compres actix-web = { version = "4.8.0", default-features = false, features = ["macros", "compress-brotli", "compress-gzip", "cookies", "rustls"] } anyhow = "1.0.86" deserr = { path = "../../", features = ["actix-web"] } -env_logger = "0.10.2" +env_logger = "0.11.3" futures = "0.3.30" futures-util = "0.3.30" log = "0.4.22" diff --git a/examples/implements_deserr_manually.rs b/examples/implements_deserr_manually.rs index a45ebe9..4789f16 100644 --- a/examples/implements_deserr_manually.rs +++ b/examples/implements_deserr_manually.rs @@ -111,12 +111,12 @@ fn main() { // And when an error arise, we get the nice error from the json error handler. let error = deserialize::(json!(["jorts", "is", ["a", 10]])).unwrap_err(); - insta::assert_display_snapshot!(error, @"Invalid value type at `[2][1]`: expected a string or an array, but found a positive integer: `10`"); + insta::assert_snapshot!(error, @"Invalid value type at `[2][1]`: expected a string or an array, but found a positive integer: `10`"); // But since we're generic over the error type we can as well switch to query parameter error! let error = deserialize::(json!(["jorts", "is", "a", 10])).unwrap_err(); - insta::assert_display_snapshot!(error, @"Invalid value type for parameter `[3]`: expected a string, but found an integer: `10`"); + insta::assert_snapshot!(error, @"Invalid value type for parameter `[3]`: expected a string, but found an integer: `10`"); // And as expected, using this `Filter` type from another struct that got its `Deserr` implementation from the derive macro just works. let filter = diff --git a/src/errors/json.rs b/src/errors/json.rs index c1e4705..2f685a6 100644 --- a/src/errors/json.rs +++ b/src/errors/json.rs @@ -232,24 +232,24 @@ mod tests { #[test] fn test_value_kinds_description_json() { - insta::assert_display_snapshot!(value_kinds_description_json(&[]), @"a different value"); - - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Boolean]), @"a boolean"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Integer]), @"a positive integer"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::NegativeInteger]), @"a negative integer"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Integer]), @"a positive integer"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::String]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Sequence]), @"an array"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Map]), @"an object"); - - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Integer, ValueKind::Boolean]), @"a boolean or a positive integer"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Null, ValueKind::Integer]), @"null or a positive integer"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Sequence, ValueKind::NegativeInteger]), @"a negative integer or an array"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Integer, ValueKind::Float]), @"a number"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger]), @"a number"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"null or a number"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Boolean, ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"null, a boolean, or a number"); - insta::assert_display_snapshot!(value_kinds_description_json(&[ValueKind::Null, ValueKind::Boolean, ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"null, a boolean, or a number"); + insta::assert_snapshot!(value_kinds_description_json(&[]), @"a different value"); + + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Boolean]), @"a boolean"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Integer]), @"a positive integer"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::NegativeInteger]), @"a negative integer"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Integer]), @"a positive integer"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::String]), @"a string"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Sequence]), @"an array"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Map]), @"an object"); + + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Integer, ValueKind::Boolean]), @"a boolean or a positive integer"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Null, ValueKind::Integer]), @"null or a positive integer"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Sequence, ValueKind::NegativeInteger]), @"a negative integer or an array"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Integer, ValueKind::Float]), @"a number"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger]), @"a number"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"null or a number"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Boolean, ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"null, a boolean, or a number"); + insta::assert_snapshot!(value_kinds_description_json(&[ValueKind::Null, ValueKind::Boolean, ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"null, a boolean, or a number"); } #[test] @@ -261,7 +261,7 @@ mod tests { } let value = json!({ "toto": 2 }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Missing field `me`"); + insta::assert_snapshot!(err, @"Missing field `me`"); } #[test] @@ -273,7 +273,7 @@ mod tests { } let value = json!({ "me": [2] }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Invalid value type at `.me`: expected a positive integer, but found an array: `[2]`"); + insta::assert_snapshot!(err, @"Invalid value type at `.me`: expected a positive integer, but found an array: `[2]`"); #[allow(dead_code)] #[derive(deserr::Deserr, Debug)] @@ -290,7 +290,7 @@ mod tests { } let value = json!({ "me": "la" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `la` at `.me`: expected one of `One`, `Two`, `Three`"); + insta::assert_snapshot!(err, @"Unknown value `la` at `.me`: expected one of `One`, `Two`, `Three`"); #[allow(dead_code)] #[derive(deserr::Deserr, Debug)] @@ -307,7 +307,7 @@ mod tests { } let value = json!({ "me": "la" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `la` at `.me`: expected one of `theobjectivecamelisnoice`, `bloup`"); + insta::assert_snapshot!(err, @"Unknown value `la` at `.me`: expected one of `theobjectivecamelisnoice`, `bloup`"); } #[test] @@ -320,7 +320,7 @@ mod tests { } let value = json!({ "me": 2, "u": "uwu" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `u`: expected one of `me`"); + insta::assert_snapshot!(err, @"Unknown field `u`: expected one of `me`"); #[allow(dead_code)] #[derive(deserr::Deserr, Debug)] @@ -331,7 +331,7 @@ mod tests { } let value = json!({ "me": 2, "and": "u", "uwu": "OwO" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `uwu`: expected one of `me`, `and`"); + insta::assert_snapshot!(err, @"Unknown field `uwu`: expected one of `me`, `and`"); } #[test] @@ -344,11 +344,11 @@ mod tests { } let value = json!({ "me": [2] }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Invalid value at `.me`: the sequence should have exactly 2 elements"); + insta::assert_snapshot!(err, @"Invalid value at `.me`: the sequence should have exactly 2 elements"); let value = json!({ "me": [2, 3, 4] }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Invalid value at `.me`: the sequence should have exactly 2 elements"); + insta::assert_snapshot!(err, @"Invalid value at `.me`: the sequence should have exactly 2 elements"); } #[test] @@ -374,72 +374,72 @@ mod tests { let value = json!({ "filler": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `filler`: did you mean `filter`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown field `filler`: did you mean `filter`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "sart": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `sart`: did you mean `sort`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown field `sart`: did you mean `sort`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "attributes_to_highlight": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `attributes_to_highlight`: did you mean `attributesToHighlight`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown field `attributes_to_highlight`: did you mean `attributesToHighlight`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "attributesToHighloght": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `attributesToHighloght`: did you mean `attributesToHighlight`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown field `attributesToHighloght`: did you mean `attributesToHighlight`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); // doesn't match anything let value = json!({ "a": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `a`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown field `a`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "query": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `query`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown field `query`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "filterable": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `filterable`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown field `filterable`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "sortable": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown field `sortable`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown field `sortable`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); // did you mean triggered by an unknown value let value = json!({ "q": "filler" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `filler` at `.q`: did you mean `filter`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `filler` at `.q`: did you mean `filter`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "sart" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `sart` at `.q`: did you mean `sort`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `sart` at `.q`: did you mean `sort`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "attributes_to_highlight" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `attributes_to_highlight` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `attributes_to_highlight` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "attributesToHighloght" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `attributesToHighloght` at `.q`: did you mean `attributesToHighLight`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `attributesToHighloght` at `.q`: did you mean `attributesToHighLight`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); // doesn't match anything let value = json!({ "q": "a" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `a` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `a` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "query" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `query` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `query` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "filterable" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `filterable` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `filterable` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "sortable" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `sortable` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `sortable` at `.q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); } } diff --git a/src/errors/query_params.rs b/src/errors/query_params.rs index 17d1e94..704fd21 100644 --- a/src/errors/query_params.rs +++ b/src/errors/query_params.rs @@ -167,24 +167,24 @@ mod tests { #[test] fn test_value_kinds_description_query_param() { - insta::assert_display_snapshot!(value_kinds_description_query_param(&[]), @"a string"); - - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Boolean]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::NegativeInteger]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::String]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Sequence]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Map]), @"a string"); - - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer, ValueKind::Boolean]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Null, ValueKind::Integer]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Sequence, ValueKind::NegativeInteger]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer, ValueKind::Float]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Boolean, ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"a string"); - insta::assert_display_snapshot!(value_kinds_description_query_param(&[ValueKind::Null, ValueKind::Boolean, ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[]), @"a string"); + + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Boolean]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::NegativeInteger]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::String]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Sequence]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Map]), @"a string"); + + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer, ValueKind::Boolean]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Null, ValueKind::Integer]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Sequence, ValueKind::NegativeInteger]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer, ValueKind::Float]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Boolean, ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"a string"); + insta::assert_snapshot!(value_kinds_description_query_param(&[ValueKind::Null, ValueKind::Boolean, ValueKind::Integer, ValueKind::Float, ValueKind::NegativeInteger, ValueKind::Null]), @"a string"); } #[test] @@ -196,7 +196,7 @@ mod tests { } let value = json!({ "toto": 2 }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Missing parameter `me`"); + insta::assert_snapshot!(err, @"Missing parameter `me`"); } #[test] @@ -208,7 +208,7 @@ mod tests { } let value = json!({ "me": [2] }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Invalid value type for parameter `me`: expected a string, but found multiple values"); + insta::assert_snapshot!(err, @"Invalid value type for parameter `me`: expected a string, but found multiple values"); #[allow(dead_code)] #[derive(deserr::Deserr, Debug)] @@ -225,7 +225,7 @@ mod tests { } let value = json!({ "me": "la" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `la` for parameter `me`: expected one of `One`, `Two`, `Three`"); + insta::assert_snapshot!(err, @"Unknown value `la` for parameter `me`: expected one of `One`, `Two`, `Three`"); #[allow(dead_code)] #[derive(deserr::Deserr, Debug)] @@ -243,7 +243,7 @@ mod tests { let value = json!({ "me": "la" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `la` for parameter `me`: expected one of `theobjectivecamelisnoice`, `bloup`"); + insta::assert_snapshot!(err, @"Unknown value `la` for parameter `me`: expected one of `theobjectivecamelisnoice`, `bloup`"); } #[test] @@ -256,7 +256,7 @@ mod tests { } let value = json!({ "me": 2, "u": "uwu" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `u`: expected one of `me`"); + insta::assert_snapshot!(err, @"Unknown parameter `u`: expected one of `me`"); #[allow(dead_code)] #[derive(deserr::Deserr, Debug)] @@ -267,7 +267,7 @@ mod tests { } let value = json!({ "me": 2, "and": "u", "uwu": "OwO" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `uwu`: expected one of `me`, `and`"); + insta::assert_snapshot!(err, @"Unknown parameter `uwu`: expected one of `me`, `and`"); } #[test] @@ -280,11 +280,11 @@ mod tests { } let value = json!({ "me": [2] }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Invalid value in parameter `me`: the sequence should have exactly 2 elements"); + insta::assert_snapshot!(err, @"Invalid value in parameter `me`: the sequence should have exactly 2 elements"); let value = json!({ "me": [2, 3, 4] }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Invalid value in parameter `me`: the sequence should have exactly 2 elements"); + insta::assert_snapshot!(err, @"Invalid value in parameter `me`: the sequence should have exactly 2 elements"); } #[test] @@ -312,72 +312,72 @@ mod tests { let value = json!({ "filler": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `filler`: did you mean `filter`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown parameter `filler`: did you mean `filter`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "sart": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `sart`: did you mean `sort`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown parameter `sart`: did you mean `sort`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "attributes_to_highlight": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `attributes_to_highlight`: did you mean `attributesToHighlight`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown parameter `attributes_to_highlight`: did you mean `attributesToHighlight`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "attributesToHighloght": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `attributesToHighloght`: did you mean `attributesToHighlight`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown parameter `attributesToHighloght`: did you mean `attributesToHighlight`? expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); // doesn't match anything let value = json!({ "a": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `a`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown parameter `a`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "query": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `query`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown parameter `query`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "filterable": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `filterable`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown parameter `filterable`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); let value = json!({ "sortable": "doggo" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown parameter `sortable`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); + insta::assert_snapshot!(err, @"Unknown parameter `sortable`: expected one of `q`, `filter`, `sort`, `attributesToHighlight`"); // did you mean triggered by an unknown value let value = json!({ "q": "filler" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `filler` for parameter `q`: did you mean `filter`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `filler` for parameter `q`: did you mean `filter`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "sart" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `sart` for parameter `q`: did you mean `sort`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `sart` for parameter `q`: did you mean `sort`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "attributes_to_highlight" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `attributes_to_highlight` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `attributes_to_highlight` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "attributesToHighloght" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `attributesToHighloght` for parameter `q`: did you mean `attributesToHighLight`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `attributesToHighloght` for parameter `q`: did you mean `attributesToHighLight`? expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); // doesn't match anything let value = json!({ "q": "a" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `a` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `a` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "query" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `query` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `query` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "filterable" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `filterable` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `filterable` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); let value = json!({ "q": "sortable" }); let err = deserr::deserialize::(value).unwrap_err(); - insta::assert_display_snapshot!(err, @"Unknown value `sortable` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); + insta::assert_snapshot!(err, @"Unknown value `sortable` for parameter `q`: expected one of `q`, `filter`, `sort`, `attributesToHighLight`"); } } diff --git a/tests/attributes/default.rs b/tests/attributes/default.rs index 42c878d..b6ef796 100644 --- a/tests/attributes/default.rs +++ b/tests/attributes/default.rs @@ -1,5 +1,5 @@ use deserr::{deserialize, Deserr, JsonError}; -use insta::{assert_debug_snapshot, assert_display_snapshot}; +use insta::{assert_debug_snapshot, assert_snapshot}; use serde_json::json; #[test] @@ -30,7 +30,7 @@ fn option_dont_use_default_by_default() { let data = deserialize::(json!({})).unwrap_err(); - assert_display_snapshot!(data, @"Json deserialize error: missing field `doggo` at ``"); + assert_snapshot!(data, @"Json deserialize error: missing field `doggo` at ``"); } #[test] diff --git a/tests/attributes/deny_unknown_fields.rs b/tests/attributes/deny_unknown_fields.rs index 582e515..735b1c0 100644 --- a/tests/attributes/deny_unknown_fields.rs +++ b/tests/attributes/deny_unknown_fields.rs @@ -4,7 +4,7 @@ use deserr::{ deserialize, errors::JsonError, take_cf_content, DeserializeError, Deserr, ErrorKind, ValuePointerRef, }; -use insta::{assert_debug_snapshot, assert_display_snapshot}; +use insta::{assert_debug_snapshot, assert_snapshot}; use serde_json::json; #[test] @@ -27,7 +27,7 @@ fn default_deny_unknown_fields() { let data = deserialize::(json!({ "word": "doggo", "turbo": "doggo" })) .unwrap_err(); - assert_display_snapshot!(data, @"Unknown field `turbo`: expected one of `word`"); + assert_snapshot!(data, @"Unknown field `turbo`: expected one of `word`"); } #[test] @@ -74,10 +74,10 @@ fn custom_deny_unknown_fields() { let data = deserialize::(json!({ "word": "doggo", "turbo": "doggo" })) .unwrap_err(); - assert_display_snapshot!(data, @"Unknown field `turbo`: expected one of `word`"); + assert_snapshot!(data, @"Unknown field `turbo`: expected one of `word`"); let data = deserialize::(json!({ "word": "doggo", "doggo": "word" })) .unwrap_err(); - assert_display_snapshot!(data, @"Invalid value: The word is doggo, not the opposite"); + assert_snapshot!(data, @"Invalid value: The word is doggo, not the opposite"); } diff --git a/tests/attributes/error.rs b/tests/attributes/error.rs index 79002b8..ead2bf9 100644 --- a/tests/attributes/error.rs +++ b/tests/attributes/error.rs @@ -1,5 +1,5 @@ use deserr::{deserialize, errors::JsonError, Deserr}; -use insta::{assert_debug_snapshot, assert_display_snapshot}; +use insta::{assert_debug_snapshot, assert_snapshot}; use serde_json::json; #[test] @@ -23,8 +23,8 @@ fn error_attribute() { "###); let data = deserialize::(json!({ "catto": "jorts" })).unwrap_err(); - assert_display_snapshot!(data, @"Missing field `doggo`"); + assert_snapshot!(data, @"Missing field `doggo`"); let data = deserialize::(json!({ "doggo": "bork" })).unwrap_err(); - assert_display_snapshot!(data, @"Missing field `catto`"); + assert_snapshot!(data, @"Missing field `catto`"); } diff --git a/tests/attributes/missing_field_error.rs b/tests/attributes/missing_field_error.rs index 891761a..d782b33 100644 --- a/tests/attributes/missing_field_error.rs +++ b/tests/attributes/missing_field_error.rs @@ -4,7 +4,7 @@ use deserr::{ deserialize, errors::JsonError, take_cf_content, DeserializeError, Deserr, ErrorKind, ValuePointerRef, }; -use insta::{assert_debug_snapshot, assert_display_snapshot}; +use insta::{assert_debug_snapshot, assert_snapshot}; use serde_json::json; #[test] @@ -37,8 +37,8 @@ fn missing_field_error() { "###); let data = deserialize::(json!({ "catto": "jorts" })).unwrap_err(); - assert_display_snapshot!(data, @"Missing field `doggo`"); + assert_snapshot!(data, @"Missing field `doggo`"); let data = deserialize::(json!({ "doggo": "bork" })).unwrap_err(); - assert_display_snapshot!(data, @"Invalid value: I really need the query field, please give it to me uwu"); + assert_snapshot!(data, @"Invalid value: I really need the query field, please give it to me uwu"); } diff --git a/tests/attributes/rename_all.rs b/tests/attributes/rename_all.rs index 25e429b..340c22a 100644 --- a/tests/attributes/rename_all.rs +++ b/tests/attributes/rename_all.rs @@ -1,5 +1,5 @@ use deserr::{deserialize, errors::JsonError, Deserr}; -use insta::{assert_debug_snapshot, assert_display_snapshot}; +use insta::{assert_debug_snapshot, assert_snapshot}; use serde_json::json; #[test] @@ -32,21 +32,21 @@ fn rename_all_camel_case() { ) .unwrap_err(); - assert_display_snapshot!(data, @"Missing field `word`"); + assert_snapshot!(data, @"Missing field `word`"); let data = deserialize::( json!({ "word": "doggo", "multiple_words": "good doggo", "renamed_field": "bork" }), ) .unwrap_err(); - assert_display_snapshot!(data, @"Missing field `multipleWords`"); + assert_snapshot!(data, @"Missing field `multipleWords`"); let data = deserialize::( json!({ "word": "doggo", "multipleWords": "good doggo", "renamedField": "bork" }), ) .unwrap_err(); - assert_display_snapshot!(data, @"Missing field `renamed_field`"); + assert_snapshot!(data, @"Missing field `renamed_field`"); } #[allow(non_snake_case)] @@ -80,19 +80,19 @@ fn rename_all_lowercase() { ) .unwrap_err(); - assert_display_snapshot!(data, @"Missing field `word`"); + assert_snapshot!(data, @"Missing field `word`"); let data = deserialize::( json!({ "word": "doggo", "screamingWord": "good doggo", "BORK": "bork" }), ) .unwrap_err(); - assert_display_snapshot!(data, @"Missing field `screaming_word`"); + assert_snapshot!(data, @"Missing field `screaming_word`"); let data = deserialize::( json!({ "word": "doggo", "screaming_word": "good doggo", "smol": "bork" }), ) .unwrap_err(); - assert_display_snapshot!(data, @"Missing field `BORK`"); + assert_snapshot!(data, @"Missing field `BORK`"); } diff --git a/tests/attributes/tag.rs b/tests/attributes/tag.rs index 0271844..67dd869 100644 --- a/tests/attributes/tag.rs +++ b/tests/attributes/tag.rs @@ -1,5 +1,5 @@ use deserr::{deserialize, errors::JsonError, Deserr}; -use insta::{assert_debug_snapshot, assert_display_snapshot}; +use insta::{assert_debug_snapshot, assert_snapshot}; use serde_json::json; #[test] @@ -48,14 +48,14 @@ fn tagged_enum() { let data = deserialize::(json!({ "either": { "doggo": "bork" } })).unwrap_err(); - assert_display_snapshot!(data, @"Missing field `type` inside `.either`"); + assert_snapshot!(data, @"Missing field `type` inside `.either`"); let data = deserialize::( json!({ "either": { "doggo": false, "catto": "jorts" } }), ) .unwrap_err(); - assert_display_snapshot!(data, @"Missing field `type` inside `.either`"); + assert_snapshot!(data, @"Missing field `type` inside `.either`"); } #[test] fn tagged_enum_plus_rename() { diff --git a/tests/attributes/try_from.rs b/tests/attributes/try_from.rs index 87bf5a4..3ecfdf3 100644 --- a/tests/attributes/try_from.rs +++ b/tests/attributes/try_from.rs @@ -9,7 +9,7 @@ use deserr::{ deserialize, errors::JsonError, take_cf_content, DeserializeError, Deserr, ErrorKind, MergeWithError, ValuePointerRef, }; -use insta::{assert_debug_snapshot, assert_display_snapshot}; +use insta::{assert_debug_snapshot, assert_snapshot}; use serde_json::json; // For the next tests we're going to deserialize a string that can't contains any non-ascii char @@ -72,7 +72,7 @@ fn from_container_attribute() { let data = deserialize::(json!("🥺")).unwrap_err(); - assert_display_snapshot!(data, @"Invalid value: Encountered invalid character: `🥺`, only ascii characters are accepted"); + assert_snapshot!(data, @"Invalid value: Encountered invalid character: `🥺`, only ascii characters are accepted"); #[allow(unused)] #[derive(Debug, Deserr)] @@ -93,7 +93,7 @@ fn from_container_attribute() { let data = deserialize::(json!({ "doggo": "👉 👈"})).unwrap_err(); - assert_display_snapshot!(data, @"Invalid value at `.doggo`: Encountered invalid character: `👉`, only ascii characters are accepted"); + assert_snapshot!(data, @"Invalid value at `.doggo`: Encountered invalid character: `👉`, only ascii characters are accepted"); } #[test] @@ -133,5 +133,5 @@ fn from_field_attribute() { let data = deserialize::(json!({ "doggo": "👉 👈"})).unwrap_err(); - assert_display_snapshot!(data, @"Invalid value at `.doggo`: Encountered invalid character: `👉`, only ascii characters are accepted"); + assert_snapshot!(data, @"Invalid value at `.doggo`: Encountered invalid character: `👉`, only ascii characters are accepted"); } diff --git a/tests/attributes/validate.rs b/tests/attributes/validate.rs index b690eb9..7176c75 100644 --- a/tests/attributes/validate.rs +++ b/tests/attributes/validate.rs @@ -3,7 +3,7 @@ use std::convert::Infallible; use deserr::{ deserialize, errors::JsonError, DeserializeError, Deserr, ErrorKind, ValuePointerRef, }; -use insta::{assert_debug_snapshot, assert_display_snapshot}; +use insta::{assert_debug_snapshot, assert_snapshot}; use serde_json::json; #[test] @@ -47,5 +47,5 @@ fn validate() { let data = deserialize::(json!({ "start": 6, "end": 2 })).unwrap_err(); - assert_display_snapshot!(data, @"Invalid value: `end` (`2`) should be greater than `start` (`6`)"); + assert_snapshot!(data, @"Invalid value: `end` (`2`) should be greater than `start` (`6`)"); } diff --git a/tests/char-error-message.rs b/tests/char-error-message.rs index cbefdf3..5af92d6 100644 --- a/tests/char-error-message.rs +++ b/tests/char-error-message.rs @@ -19,11 +19,11 @@ fn deserialize_char() { "###); let ret = deserr::deserialize::(json!({ "c": "jorts" })).unwrap_err(); - insta::assert_display_snapshot!(ret, @"Invalid value at `.c`: expected a string of one character, but found the following string of 5 characters: `jorts`"); + insta::assert_snapshot!(ret, @"Invalid value at `.c`: expected a string of one character, but found the following string of 5 characters: `jorts`"); let ret = deserr::deserialize::(json!({ "c": "" })).unwrap_err(); - insta::assert_display_snapshot!(ret, @"Invalid value at `.c`: expected a string of one character, but found an empty string"); + insta::assert_snapshot!(ret, @"Invalid value at `.c`: expected a string of one character, but found an empty string"); let ret = deserr::deserialize::(json!({ "c": null })).unwrap_err(); - insta::assert_display_snapshot!(ret, @"Invalid value type at `.c`: expected a string, but found null"); + insta::assert_snapshot!(ret, @"Invalid value type at `.c`: expected a string, but found null"); } From 25d860c7018216eca598bfe56ca6d65bee8c105f Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 2 Jul 2024 15:28:20 +0200 Subject: [PATCH 3/6] make rust happy --- examples/implements_deserr_manually.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/implements_deserr_manually.rs b/examples/implements_deserr_manually.rs index 4789f16..b4a5f69 100644 --- a/examples/implements_deserr_manually.rs +++ b/examples/implements_deserr_manually.rs @@ -17,6 +17,7 @@ struct Query { /// - `"jorts"` /// - `["jorts", "jean"]` /// - `["jorts", ["bilbo", "bob"], "jean"]` +#[allow(dead_code)] #[derive(Debug)] enum Filter { Array(Vec), From 1de51ac4484c9ce8447d60d12928256f2d02d145 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 2 Jul 2024 15:28:31 +0200 Subject: [PATCH 4/6] update env_logger --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1fbc857..fb7a369 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde-cs = { version = "0.2.4", optional = true } actix-web = { version = "4.8.0", default-features = false, optional = true } futures = { version = "0.3.30", optional = true } deserr-internal = { version = "=0.6.0", path = "derive" } -strsim = "0.10.0" +strsim = "0.11.1" actix-http = { version = "3.8.0", optional = true } actix-utils = { version = "3.0.1", optional = true } serde_urlencoded = "0.7.1" From 379cfa81b2a6200ccc6c390ddc8ae70d638cceb0 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 2 Jul 2024 16:00:00 +0200 Subject: [PATCH 5/6] prepare for release --- Cargo.toml | 4 ++-- derive/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fb7a369..fd8df87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deserr" -version = "0.6.0" +version = "0.6.1" authors = ["Lo ", "Tamo "] license = "MIT OR Apache-2.0" description = "Deserialization library with focus on error handling" @@ -15,7 +15,7 @@ serde_json = { version = "1.0", optional = true } serde-cs = { version = "0.2.4", optional = true } actix-web = { version = "4.8.0", default-features = false, optional = true } futures = { version = "0.3.30", optional = true } -deserr-internal = { version = "=0.6.0", path = "derive" } +deserr-internal = { version = "=0.6.1", path = "derive" } strsim = "0.11.1" actix-http = { version = "3.8.0", optional = true } actix-utils = { version = "3.0.1", optional = true } diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 19b760a..08aa5c1 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deserr-internal" -version = "0.6.0" +version = "0.6.1" authors = ["Lo ", "Tamo "] license = "MIT OR Apache-2.0" description = "Derive macros for Deserr. Use the re-exports from the deserr crate instead." From f6a9de2575c8ae8680f7f77cd72d5b76fc2628c6 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 2 Jul 2024 16:01:52 +0200 Subject: [PATCH 6/6] update deserr --- Cargo.toml | 4 ++-- derive/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fd8df87..fb12cc6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deserr" -version = "0.6.1" +version = "0.6.2" authors = ["Lo ", "Tamo "] license = "MIT OR Apache-2.0" description = "Deserialization library with focus on error handling" @@ -15,7 +15,7 @@ serde_json = { version = "1.0", optional = true } serde-cs = { version = "0.2.4", optional = true } actix-web = { version = "4.8.0", default-features = false, optional = true } futures = { version = "0.3.30", optional = true } -deserr-internal = { version = "=0.6.1", path = "derive" } +deserr-internal = { version = "=0.6.2", path = "derive" } strsim = "0.11.1" actix-http = { version = "3.8.0", optional = true } actix-utils = { version = "3.0.1", optional = true } diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 08aa5c1..0ab57cb 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deserr-internal" -version = "0.6.1" +version = "0.6.2" authors = ["Lo ", "Tamo "] license = "MIT OR Apache-2.0" description = "Derive macros for Deserr. Use the re-exports from the deserr crate instead."