diff --git a/codex-rs/core/src/exec_policy.rs b/codex-rs/core/src/exec_policy.rs index cb7a384860..154f5a312a 100644 --- a/codex-rs/core/src/exec_policy.rs +++ b/codex-rs/core/src/exec_policy.rs @@ -287,10 +287,6 @@ mod tests { .expect("policy result"); let commands = [vec!["rm".to_string()]]; - let evaluation = policy - .read() - .await - .check_multiple(commands.iter(), &|_| Decision::Allow); assert_eq!( Evaluation { decision: Decision::Allow, @@ -299,7 +295,10 @@ mod tests { decision: Decision::Allow }], }, - evaluation + policy + .read() + .await + .check_multiple(commands.iter(), &|_| Decision::Allow) ); assert!(!temp_dir.path().join(POLICY_DIR_NAME).exists()); } @@ -331,10 +330,6 @@ mod tests { .await .expect("policy result"); let command = [vec!["rm".to_string()]]; - let evaluation = policy - .read() - .await - .check_multiple(command.iter(), &|_| Decision::Allow); assert_eq!( Evaluation { decision: Decision::Forbidden, @@ -343,7 +338,10 @@ mod tests { decision: Decision::Forbidden }], }, - evaluation + policy + .read() + .await + .check_multiple(command.iter(), &|_| Decision::Allow) ); } @@ -360,10 +358,6 @@ mod tests { .await .expect("policy result"); let command = [vec!["ls".to_string()]]; - let evaluation = policy - .read() - .await - .check_multiple(command.iter(), &|_| Decision::Allow); assert_eq!( Evaluation { decision: Decision::Allow, @@ -372,7 +366,10 @@ mod tests { decision: Decision::Allow }], }, - evaluation + policy + .read() + .await + .check_multiple(command.iter(), &|_| Decision::Allow) ); }