about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-09-24 15:35:10 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-09-30 05:23:07 +1000
commit7130e6c0733ca4e6d8fc1dd08a882ff3547c94ba (patch)
tree8e25d70f50baad68dff57f65b0d3e3526912ee2d
parent85a56cbd88931db032417429d45c75d5049d0c2e (diff)
downloadrust-7130e6c0733ca4e6d8fc1dd08a882ff3547c94ba.tar.gz
rust-7130e6c0733ca4e6d8fc1dd08a882ff3547c94ba.zip
Tweak the control flow in `process_obligations()`.
-rw-r--r--src/librustc_data_structures/obligation_forest/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_data_structures/obligation_forest/mod.rs b/src/librustc_data_structures/obligation_forest/mod.rs
index 3cf3bfc1fd4..77eb0beeec3 100644
--- a/src/librustc_data_structures/obligation_forest/mod.rs
+++ b/src/librustc_data_structures/obligation_forest/mod.rs
@@ -404,10 +404,10 @@ impl<O: ForestObligation> ObligationForest<O> {
             // `self.active_cache`. This means that `self.active_cache` can get
             // out of sync with `nodes`. It's not very common, but it does
             // happen, and code in `compress` has to allow for it.
-            let result = match node.state.get() {
-                NodeState::Pending => processor.process_obligation(&mut node.obligation),
-                _ => continue
-            };
+            if node.state.get() != NodeState::Pending {
+                continue;
+            }
+            let result = processor.process_obligation(&mut node.obligation);
 
             debug!("process_obligations: node {} got result {:?}", index, result);