Various minor Idx-related tweaks
Nothing particularly exciting here, but a couple of things I noticed as I was looking for more index conversions to simplify.
This commit is contained in:
parent
2a71115261
commit
c98895d9f2
17 changed files with 55 additions and 52 deletions
|
@ -24,10 +24,7 @@ impl<K: DepKind> DepGraphQuery<K> {
|
|||
|
||||
pub fn push(&mut self, index: DepNodeIndex, node: DepNode<K>, edges: &[DepNodeIndex]) {
|
||||
let source = self.graph.add_node(node);
|
||||
if index.index() >= self.dep_index_to_index.len() {
|
||||
self.dep_index_to_index.resize(index.index() + 1, None);
|
||||
}
|
||||
self.dep_index_to_index[index] = Some(source);
|
||||
self.dep_index_to_index.insert(index, source);
|
||||
self.indices.insert(node, source);
|
||||
|
||||
for &target in edges.iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue