@@ -494,7 +494,7 @@ mod tests {
494494 use crate :: cli:: agent:: Agent ;
495495
496496 let os = Os :: new ( ) . await . unwrap ( ) ;
497-
497+
498498 // Test read-only command with default settings (allow_read_only = false)
499499 let readonly_cmd = serde_json:: from_value :: < ExecuteCommand > ( serde_json:: json!( {
500500 "command" : "ls -la" ,
@@ -519,15 +519,16 @@ mod tests {
519519
520520 #[ tokio:: test]
521521 async fn test_eval_perm_allow_read_only_enabled ( ) {
522+ use std:: collections:: HashMap ;
523+
522524 use crate :: cli:: agent:: {
523525 Agent ,
524526 ToolSettingTarget ,
525527 } ;
526- use std:: collections:: HashMap ;
527528
528529 let os = Os :: new ( ) . await . unwrap ( ) ;
529530 let tool_name = if cfg ! ( windows) { "execute_cmd" } else { "execute_bash" } ;
530-
531+
531532 let agent = Agent {
532533 name : "test_agent" . to_string ( ) ,
533534 tools_settings : {
@@ -566,15 +567,16 @@ mod tests {
566567
567568 #[ tokio:: test]
568569 async fn test_eval_perm_allow_read_only_with_denied_commands ( ) {
570+ use std:: collections:: HashMap ;
571+
569572 use crate :: cli:: agent:: {
570573 Agent ,
571574 ToolSettingTarget ,
572575 } ;
573- use std:: collections:: HashMap ;
574576
575577 let os = Os :: new ( ) . await . unwrap ( ) ;
576578 let tool_name = if cfg ! ( windows) { "execute_cmd" } else { "execute_bash" } ;
577-
579+
578580 let agent = Agent {
579581 name : "test_agent" . to_string ( ) ,
580582 tools_settings : {
@@ -599,7 +601,9 @@ mod tests {
599601
600602 let res = denied_readonly_cmd. eval_perm ( & os, & agent) ;
601603 // Should deny even read-only commands if they're in denied list
602- assert ! ( matches!( res, PermissionEvalResult :: Deny ( ref commands) if commands. contains( & "\\ Als .*\\ z" . to_string( ) ) ) ) ;
604+ assert ! (
605+ matches!( res, PermissionEvalResult :: Deny ( ref commands) if commands. contains( & "\\ Als .*\\ z" . to_string( ) ) )
606+ ) ;
603607
604608 // Test different read-only command not in denied list
605609 let allowed_readonly_cmd = serde_json:: from_value :: < ExecuteCommand > ( serde_json:: json!( {
0 commit comments