From 12c97aa898b66552739539e1c63defcbc4e15c4a Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 12 Dec 2024 12:57:45 -0800 Subject: [PATCH] fix build --- dsc/src/util.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dsc/src/util.rs b/dsc/src/util.rs index fb358742..c1495109 100644 --- a/dsc/src/util.rs +++ b/dsc/src/util.rs @@ -27,6 +27,7 @@ use dsc_lib::{ }; use jsonschema::Validator; use path_absolutize::Absolutize; +use rust_i18n::t; use schemars::{schema_for, schema::RootSchema}; use serde::Deserialize; use serde_json::Value; @@ -438,12 +439,12 @@ pub fn validate_json(source: &str, schema: &Value, json: &Value) -> Result<(), D let compiled_schema = match Validator::new(schema) { Ok(compiled_schema) => compiled_schema, Err(err) => { - return Err(DscError::Validation(format!("{}: {err}", t!("util.failedToCompileSchema"))); + return Err(DscError::Validation(format!("{}: {err}", t!("util.failedToCompileSchema")))); } }; if let Err(err) = compiled_schema.validate(json) { - return Err(DscError::Validation(format!("{}: '{source}' {err}", t!("util.validationFailed"))); + return Err(DscError::Validation(format!("{}: '{source}' {err}", t!("util.validationFailed")))); }; Ok(())