aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-29 04:14:56 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-29 04:14:56 +0800
commitc58fee1ef37b0f86fa250331247a305cbf9bc360 (patch)
tree8b77b0b31b38632bf2acb54672dc7ee7b2770c9a
parent3423840fe9711985f2460d5ff59505ccd94c758d (diff)
fix(deps): bump just_template to 0.2.0 and migrate to new API
-rw-r--r--Cargo.lock16
-rw-r--r--Cargo.toml2
-rw-r--r--mingling_core/src/builds/comp.rs6
3 files changed, 18 insertions, 6 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 7e1f179..087c95c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -344,11 +344,23 @@ checksum = "5454cda0d57db59778608d7a47bff5b16c6705598265869fb052b657f66cf05e"
[[package]]
name = "just_template"
-version = "0.1.3"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db3edb658c34b10b69c4b3b58f7ba989cd09c82c0621dee1eef51843c2327225"
+checksum = "4fb99a3c1dee7299c57b26ef927f15535da0fbc93d6deb1d1114cae1337be4fb"
dependencies = [
"just_fmt",
+ "just_template_macros",
+]
+
+[[package]]
+name = "just_template_macros"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1471eb68722ecefeb71debdde2859e8725341f171d3f42b3a98a0862ad19416e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 95cb488..b19bfb9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ mingling_macros = { path = "mingling_macros", default-features = false }
mingling_pathf = { path = "mingling_pathf", default-features = false }
just_fmt = "0.1.2"
-just_template = "0.1.3"
+just_template = "0.2.0"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.150"
diff --git a/mingling_core/src/builds/comp.rs b/mingling_core/src/builds/comp.rs
index b826531..2abb1e1 100644
--- a/mingling_core/src/builds/comp.rs
+++ b/mingling_core/src/builds/comp.rs
@@ -1,6 +1,6 @@
use std::path::PathBuf;
-use just_template::tmpl_param;
+use just_template::tmpl;
use crate::ShellFlag;
@@ -86,7 +86,7 @@ pub fn build_comp_script_to(
) -> Result<(), std::io::Error> {
let (tmpl_str, ext) = get_tmpl(shell_flag);
let mut tmpl = just_template::Template::from(tmpl_str);
- tmpl_param!(tmpl, bin_name = bin_name);
+ tmpl!(bin_name = bin_name);
let target_path = std::path::PathBuf::from(target_dir);
std::fs::create_dir_all(&target_path)?;
let output_path = target_path.join(format!("{bin_name}_comp{ext}"));
@@ -112,7 +112,7 @@ pub fn build_comp_script_to_file(
) -> Result<(), std::io::Error> {
let (tmpl_str, _ext) = get_tmpl(shell_flag);
let mut tmpl = just_template::Template::from(tmpl_str);
- tmpl_param!(tmpl, bin_name = bin_name);
+ tmpl!(bin_name = bin_name);
std::fs::write(output_path.into(), tmpl.to_string())
}