summaryrefslogtreecommitdiff
path: root/gen/src/gen_commands_file.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-03-20 22:21:56 +0800
committer魏曹先生 <1992414357@qq.com>2026-03-20 22:21:56 +0800
commitab6be7968b25afb57fc428695693484ad8576718 (patch)
treee4af27964f195a18a678844dbe71c0aaa182b5dc /gen/src/gen_commands_file.rs
parent6b22f7b7694fce530f84ba94c65c057450cca626 (diff)
Refactor code to use modern Rust idioms and fix clippy lints
Diffstat (limited to 'gen/src/gen_commands_file.rs')
-rw-r--r--gen/src/gen_commands_file.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/gen/src/gen_commands_file.rs b/gen/src/gen_commands_file.rs
index c90e356..1401578 100644
--- a/gen/src/gen_commands_file.rs
+++ b/gen/src/gen_commands_file.rs
@@ -1,4 +1,4 @@
-use std::path::PathBuf;
+use std::path::Path;
use just_fmt::pascal_case;
use just_template::{Template, tmpl, tmpl_param};
@@ -6,7 +6,7 @@ use just_template::{Template, tmpl, tmpl_param};
use crate::constants::{COMMAND_LIST, COMMAND_LIST_TEMPLATE, COMMANDS_PATH, REGISTRY_TOML};
/// Generate registry file from Registry.toml configuration using just_template
-pub async fn generate_commands_file(repo_root: &PathBuf) {
+pub async fn generate_commands_file(repo_root: &Path) {
let template_path = repo_root.join(COMMAND_LIST_TEMPLATE);
let output_path = repo_root.join(COMMAND_LIST);
let config_path = repo_root.join(REGISTRY_TOML);