diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-09-24 15:35:10 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-09-30 05:23:07 +1000 |
| commit | 7130e6c0733ca4e6d8fc1dd08a882ff3547c94ba (patch) | |
| tree | 8e25d70f50baad68dff57f65b0d3e3526912ee2d | |
| parent | 85a56cbd88931db032417429d45c75d5049d0c2e (diff) | |
| download | rust-7130e6c0733ca4e6d8fc1dd08a882ff3547c94ba.tar.gz rust-7130e6c0733ca4e6d8fc1dd08a882ff3547c94ba.zip | |
Tweak the control flow in `process_obligations()`.
| -rw-r--r-- | src/librustc_data_structures/obligation_forest/mod.rs | 8 |
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); |
