Skip to content

Commit 601c49a

Browse files
authored
chore: Update validation dependencies (#35)
1 parent ba76a8f commit 601c49a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ rust-version = "1.72"
1313
[dependencies]
1414
actix-web = "4"
1515
thiserror = "2"
16-
validator = { version = "0.19", optional = true }
17-
garde = { version = "0.21", optional = true }
16+
validator = { version = "0.20", optional = true }
17+
garde = { version = "0.22", optional = true }
1818

1919
[dev-dependencies]
2020
serde = { version = "1", features = ["derive"]}
2121
serde_json = "1"
22-
validator = { version = "0.19", features = ["derive"] }
23-
garde = { version = "0.21", features = ["derive"] }
22+
validator = { version = "0.20", features = ["derive"] }
23+
garde = { version = "0.22", features = ["derive"] }
2424
derive_more = { version = "1", features = ["display"] }
2525

2626
[features]

src/validator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ fn _flatten_errors(
173173
errors
174174
.errors()
175175
.iter()
176-
.flat_map(|(&field, err)| {
176+
.flat_map(|(field, err)| {
177177
let indent = indent.unwrap_or(0);
178178
let actual_path = path
179179
.as_ref()
180-
.map(|path| [path.as_str(), field].join("."))
181-
.unwrap_or_else(|| field.to_owned());
180+
.map(|path| [path.as_str(), &field].join("."))
181+
.unwrap_or_else(|| field.to_string());
182182
match err {
183183
ValidationErrorsKind::Field(field_errors) => field_errors
184184
.iter()

0 commit comments

Comments
 (0)