From dc13fa58448b7e267fb0ba63427534127f76beca Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 24 Jun 2026 06:58:09 +0800 Subject: Move flag tests to separate module and clean up deref patterns --- mingling_core/src/comp/shell_ctx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mingling_core/src/comp/shell_ctx.rs') diff --git a/mingling_core/src/comp/shell_ctx.rs b/mingling_core/src/comp/shell_ctx.rs index 9d84aa7..616eade 100644 --- a/mingling_core/src/comp/shell_ctx.rs +++ b/mingling_core/src/comp/shell_ctx.rs @@ -307,7 +307,7 @@ mod tests { fn test_try_from_flag_without_value() { let args = vec!["-F".to_string()]; let context = ShellContext::try_from(args).unwrap(); - assert!(matches!(context.shell_flag, ShellFlag::Other(ref s) if s == "")); + assert!(matches!(context.shell_flag, ShellFlag::Other(ref s) if s.is_empty())); } #[test] -- cgit