diff --git a/codex-rs/execpolicy2/src/rule.rs b/codex-rs/execpolicy2/src/rule.rs index 0285773c69..586d0c3124 100644 --- a/codex-rs/execpolicy2/src/rule.rs +++ b/codex-rs/execpolicy2/src/rule.rs @@ -109,7 +109,7 @@ impl PrefixRule { for example in matches { if self.matches(example).is_none() { return Err(Error::ExampleDidNotMatch { - rule: self.description(), + rule: format!("{self:?}"), example: join_command(example), }); } @@ -117,21 +117,13 @@ impl PrefixRule { for example in not_matches { if self.matches(example).is_some() { return Err(Error::ExampleDidMatch { - rule: self.description(), + rule: format!("{self:?}"), example: join_command(example), }); } } Ok(()) } - - pub fn description(&self) -> String { - format!( - "prefix_rule(pattern = {pattern:?}, decision = {decision})", - pattern = self.pattern, - decision = self.decision - ) - } } #[derive(Clone, Debug, Eq, PartialEq)]