implementing PartialOrd for Decision instead of defining custom is_stricter_than func

This commit is contained in:
kevin zhao
2025-11-10 17:20:51 -08:00
parent 270abdc0c4
commit 2952c14719
2 changed files with 2 additions and 17 deletions

View File

@@ -42,13 +42,7 @@ impl Policy {
if let Some(matched) = rule.matches(cmd) {
let decision = match best_decision {
None => matched.decision,
Some(current) => {
if matched.decision.is_stricter_than(current) {
matched.decision
} else {
current
}
}
Some(current) => std::cmp::max(matched.decision, current),
};
best_decision = Some(decision);
matched_rules.push(matched);