mirror of
https://github.com/openai/codex.git
synced 2026-05-01 20:02:05 +03:00
removing decription()
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user