diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-02-25 10:58:39 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-02-25 10:58:39 +0800 |
| commit | 6bd344793e5c2e84361475d6e221007ef21faaad (patch) | |
| tree | 4d2cb4148b534381b5d110b97a690d8bfd921855 /src/systems/cmd/macros.rs | |
| parent | 5f3d4892a12189e88e692eabdd5f8fe68c79b23e (diff) | |
Remove ambiguous command error and auto-select longest match
Diffstat (limited to 'src/systems/cmd/macros.rs')
| -rw-r--r-- | src/systems/cmd/macros.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/systems/cmd/macros.rs b/src/systems/cmd/macros.rs index c7d576d..23a277c 100644 --- a/src/systems/cmd/macros.rs +++ b/src/systems/cmd/macros.rs @@ -161,6 +161,9 @@ macro_rules! command_template { #[macro_export] macro_rules! cmd_output { ($v:expr, $t:ty) => { - Ok((Box::new($v), stringify!($t).to_string())) + Ok(( + Box::new($v) as Box<dyn std::any::Any + Send + 'static>, + stringify!($t).to_string(), + )) }; } |
