Skip to content

Commit 7130e6c

Browse files
committed
Tweak the control flow in process_obligations().
1 parent 85a56cb commit 7130e6c

File tree

1 file changed

+4
-4
lines changed
  • src/librustc_data_structures/obligation_forest

1 file changed

+4
-4
lines changed

src/librustc_data_structures/obligation_forest/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,10 @@ impl<O: ForestObligation> ObligationForest<O> {
404404
// `self.active_cache`. This means that `self.active_cache` can get
405405
// out of sync with `nodes`. It's not very common, but it does
406406
// happen, and code in `compress` has to allow for it.
407-
let result = match node.state.get() {
408-
NodeState::Pending => processor.process_obligation(&mut node.obligation),
409-
_ => continue
410-
};
407+
if node.state.get() != NodeState::Pending {
408+
continue;
409+
}
410+
let result = processor.process_obligation(&mut node.obligation);
411411

412412
debug!("process_obligations: node {} got result {:?}", index, result);
413413

0 commit comments

Comments
 (0)