Skip to content

Commit

Permalink
Merge pull request #26 from yassun7010/change_rule_closure
Browse files Browse the repository at this point in the history
chore: update version.
  • Loading branch information
yassun7010 authored Jan 7, 2024
2 parents e9da032 + 0aa49c0 commit cf59b21
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion axum_serde_valid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jsonschema = { version = "^0.17", optional = true }
schemars = { version = "^0.8", optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_valid = { version = "0.16.1", path = "../serde_valid", features = [
serde_valid = { version = "0.16.3", path = "../serde_valid", features = [
"flatten",
] }
tracing = "^0.1"
Expand Down
10 changes: 5 additions & 5 deletions serde_valid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ version.workspace = true

[dependencies]
fluent_0 = { package = "fluent", version = "^0.16.0", optional = true }
indexmap = { version = "^1.9", features = ["serde"] }
itertools = "^0.10"
indexmap = { version = "^2.0", features = ["serde"] }
itertools = "^0.12"
jsonschema = { version = "^0.17", optional = true }
num-traits = "^0.2"
once_cell = "^1.7"
paste = { workspace = true }
regex = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_toml = { package = "toml", version = "^0.7", optional = true }
serde_valid_derive = { version = "0.16.1", path = "../serde_valid_derive" }
serde_valid_literal = { version = "0.16.1", path = "../serde_valid_literal" }
serde_toml = { package = "toml", version = "^0.8", optional = true }
serde_valid_derive = { version = "0.16.3", path = "../serde_valid_derive" }
serde_valid_literal = { version = "0.16.3", path = "../serde_valid_literal" }
serde_yaml = { version = "^0.9", optional = true }
thiserror = "^1.0"
unicode-segmentation = "^1.7"
Expand Down
8 changes: 3 additions & 5 deletions serde_valid/tests/custom_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ mod parenthesized {

#[test]
fn custom_validation_is_ok() {
fn user_validation(_val: &[i32]) -> Result<(), serde_valid::validation::Error> {
fn user_validation(_val: &i32) -> Result<(), serde_valid::validation::Error> {
Ok(())
}

#[derive(Validate)]
struct TestStruct {
#[validate(custom(user_validation))]
val: Vec<i32>,
val: i32,
}

let s = TestStruct {
val: vec![1, 2, 3, 4],
};
let s = TestStruct { val: 1 };
assert!(s.validate().is_ok());
}

Expand Down
2 changes: 1 addition & 1 deletion serde_valid_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ proc-macro-error = "^1.0"
proc-macro2 = "^1.0"
quote = "^1.0"
strsim = "^0.10"
syn = { version = "^2.0", features = ["extra-traits"] }
syn = { version = "^2.0", features = ["extra-traits", "full"] }

[features]
default = []
Expand Down

0 comments on commit cf59b21

Please sign in to comment.