diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-02-25 15:24:18 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-02-25 15:24:18 +0800 |
| commit | fcbd18c4b7d90388a9a2b9e28555d2526727958c (patch) | |
| tree | 0de680895d6a162a99356d6e4d733942a339275e /systems/action/action_macros | |
| parent | 8b96e8171c4e9d6516fd63d37cbe613bd5927a04 (diff) | |
Replace string_proc with just_fmt as external dependency
Diffstat (limited to 'systems/action/action_macros')
| -rw-r--r-- | systems/action/action_macros/Cargo.toml | 3 | ||||
| -rw-r--r-- | systems/action/action_macros/src/lib.rs | 4 |
2 files changed, 4 insertions, 3 deletions
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?; |
