Streamline active_cache
to done_cache
transfer.
This commit is contained in:
parent
fee3a459dd
commit
cdb446fec3
1 changed files with 5 additions and 8 deletions
|
@ -634,17 +634,14 @@ impl<O: ForestObligation> ObligationForest<O> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NodeState::Done => {
|
NodeState::Done => {
|
||||||
// This lookup can fail because the contents of
|
// The removal lookup might fail because the contents of
|
||||||
// `self.active_cache` are not guaranteed to match those of
|
// `self.active_cache` are not guaranteed to match those of
|
||||||
// `self.nodes`. See the comment in `process_obligation`
|
// `self.nodes`. See the comment in `process_obligation`
|
||||||
// for more details.
|
// for more details.
|
||||||
if let Some((predicate, _)) =
|
let cache_key = node.obligation.as_cache_key();
|
||||||
self.active_cache.remove_entry(&node.obligation.as_cache_key())
|
self.active_cache.remove(&cache_key);
|
||||||
{
|
self.done_cache.insert(cache_key);
|
||||||
self.done_cache.insert(predicate);
|
|
||||||
} else {
|
|
||||||
self.done_cache.insert(node.obligation.as_cache_key().clone());
|
|
||||||
}
|
|
||||||
// Extract the success stories.
|
// Extract the success stories.
|
||||||
outcome_cb(&node.obligation);
|
outcome_cb(&node.obligation);
|
||||||
node_rewrites[index] = orig_nodes_len;
|
node_rewrites[index] = orig_nodes_len;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue