From fcbd18c4b7d90388a9a2b9e28555d2526727958c Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 25 Feb 2026 15:24:18 +0800 Subject: Replace string_proc with just_fmt as external dependency --- systems/action/action_macros/Cargo.toml | 3 ++- systems/action/action_macros/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'systems') diff --git a/systems/action/action_macros/Cargo.toml b/systems/action/action_macros/Cargo.toml index 8b23191..0f209e2 100644 --- a/systems/action/action_macros/Cargo.toml +++ b/systems/action/action_macros/Cargo.toml @@ -8,7 +8,8 @@ proc-macro = true [dependencies] tcp_connection = { path = "../../../utils/tcp_connection" } -string_proc = { path = "../../../utils/string_proc" } + +just_fmt = "0.1.2" syn = { version = "2.0", features = ["full", "extra-traits"] } quote = "1.0" diff --git a/systems/action/action_macros/src/lib.rs b/systems/action/action_macros/src/lib.rs index e6616b4..6da0339 100644 --- a/systems/action/action_macros/src/lib.rs +++ b/systems/action/action_macros/src/lib.rs @@ -89,7 +89,7 @@ fn generate_action_struct(input_fn: ItemFn, _is_local: bool) -> proc_macro2::Tok impl action_system::action::Action<#arg_type, #return_type> for #struct_name { fn action_name() -> &'static str { - Box::leak(string_proc::snake_case!(stringify!(#action_name_ident)).into_boxed_str()) + Box::leak(just_fmt::snake_case!(stringify!(#action_name_ident)).into_boxed_str()) } fn is_remote_action() -> bool { @@ -116,7 +116,7 @@ fn generate_action_struct(input_fn: ItemFn, _is_local: bool) -> proc_macro2::Tok tcp_connection::error::TcpTargetError::Serialization(e.to_string()) })?; let result_json = pool.process_json( - Box::leak(string_proc::snake_case!(stringify!(#action_name_ident)).into_boxed_str()), + Box::leak(just_fmt::snake_case!(stringify!(#action_name_ident)).into_boxed_str()), // LEAK??? OH SHIT ctx, args_json, ).await?; -- cgit