simplify match + move debug! call

This commit is contained in:
lcnr 2024-07-23 13:14:19 +02:00
parent 51338ca0eb
commit e87157ba2a

View File

@ -106,6 +106,7 @@ pub enum UsageKind {
impl UsageKind {
fn merge(self, other: Self) -> Self {
match (self, other) {
(UsageKind::Mixed, _) | (_, UsageKind::Mixed) => UsageKind::Mixed,
(UsageKind::Single(lhs), UsageKind::Single(rhs)) => {
if lhs == rhs {
UsageKind::Single(lhs)
@ -113,9 +114,6 @@ fn merge(self, other: Self) -> Self {
UsageKind::Mixed
}
}
(UsageKind::Mixed, UsageKind::Mixed)
| (UsageKind::Mixed, UsageKind::Single(_))
| (UsageKind::Single(_), UsageKind::Mixed) => UsageKind::Mixed,
}
}
}
@ -458,7 +456,7 @@ pub fn with_new_goal(
for _ in 0..D::FIXPOINT_STEP_LIMIT {
match self.fixpoint_step_in_task(cx, input, inspect, &mut prove_goal) {
StepResult::Done(final_entry, result) => return (final_entry, result),
StepResult::HasChanged => debug!("fixpoint changed provisional results"),
StepResult::HasChanged => {}
}
}
@ -623,6 +621,7 @@ fn fixpoint_step_in_task<F>(
if D::reached_fixpoint(cx, usage_kind, input, stack_entry.provisional_result, result) {
StepResult::Done(stack_entry, result)
} else {
debug!(?result, "fixpoint changed provisional results");
let depth = self.stack.push(StackEntry {
has_been_used: None,
provisional_result: Some(result),