From 924cfcf22c0f2fc03477c1c0c97394ec70b720e0 Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 21 Jun 2024 11:24:51 +0900 Subject: [PATCH] refactor --- src/config/client.rs | 4 ++-- src/config/server.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/client.rs b/src/config/client.rs index ad8426d..aba7ca7 100644 --- a/src/config/client.rs +++ b/src/config/client.rs @@ -5,13 +5,13 @@ // Optional values are handled in the main Firefish program, and this tool // does not take care of it. -use super::Revision; +use super::{ensure_latest_revision, Revision}; use serde::{Deserialize, Serialize}; use validator::{Validate, ValidationError}; #[derive(Deserialize, Serialize, Validate, Debug)] pub struct Config { - #[validate(custom(function = "super::ensure_latest_revision"))] + #[validate(custom(function = "ensure_latest_revision"))] pub config_revision: Revision, #[validate(nested)] pub theme: Option, diff --git a/src/config/server.rs b/src/config/server.rs index b180560..3783146 100644 --- a/src/config/server.rs +++ b/src/config/server.rs @@ -5,13 +5,13 @@ // Optional values are handled in the main Firefish program, and this tool // does not take care of it. -use super::Revision; +use super::{ensure_latest_revision, Revision}; use serde::{Deserialize, Serialize}; use validator::Validate; #[derive(Deserialize, Serialize, Validate, Debug)] pub struct Config { - #[validate(custom(function = "super::ensure_latest_revision"))] + #[validate(custom(function = "ensure_latest_revision"))] pub config_revision: Revision, #[validate(nested)] pub info: Option,