cleanup and prettify

This commit is contained in:
kevin zhao
2025-11-12 14:36:48 -05:00
parent 4d0fffd387
commit b751be9156
4 changed files with 65 additions and 57 deletions

View File

@@ -59,14 +59,14 @@ impl Policy {
impl std::fmt::Display for Evaluation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::NoMatch => f.write_str("NoMatch"),
Self::NoMatch => f.write_str("noMatch"),
Self::Match {
decision,
matched_rules,
} => {
writeln!(f, "Match {{")?;
writeln!(f, "match {{")?;
writeln!(f, " decision: {decision},")?;
writeln!(f, " matched_rules: [")?;
writeln!(f, " matchedRules: [")?;
for rule in matched_rules {
writeln!(f, " {rule},")?;
}

View File

@@ -120,7 +120,7 @@ impl std::fmt::Display for RuleMatch {
decision,
} => write!(
f,
"PrefixRuleMatch {{ matched_prefix: {matched_prefix:?}, decision: {decision} }}"
"prefixRuleMatch {{ matchedPrefix: {matched_prefix:?}, decision: {decision} }}"
),
}
}