From 4dc8155712b44bc3ccad0752fe058520b2ce5d39 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 8 Nov 2024 08:26:29 -0700 Subject: [PATCH] Update code for validator 0.19.0 --- src/nix/key.rs | 6 +++--- src/nix/mod.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nix/key.rs b/src/nix/key.rs index c776dd4..aa3523e 100644 --- a/src/nix/key.rs +++ b/src/nix/key.rs @@ -87,14 +87,14 @@ pub struct Key { #[serde(flatten)] source: KeySource, - #[validate(custom = "validate_dest_dir")] + #[validate(custom(function = "validate_dest_dir"))] #[serde(rename = "destDir")] dest_dir: PathBuf, - #[validate(custom = "validate_unix_name")] + #[validate(custom(function = "validate_unix_name"))] user: String, - #[validate(custom = "validate_unix_name")] + #[validate(custom(function = "validate_unix_name"))] group: String, permissions: String, diff --git a/src/nix/mod.rs b/src/nix/mod.rs index 8479ce6..15be22c 100644 --- a/src/nix/mod.rs +++ b/src/nix/mod.rs @@ -81,7 +81,7 @@ pub struct NodeConfig { #[serde(rename = "sshOptions")] extra_ssh_options: Vec, - #[validate(custom = "validate_keys")] + #[validate(custom(function = "validate_keys"))] keys: HashMap, }