Rollup merge of #110394 - scottmcm:less-idx-new, r=WaffleLapkin
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. cc https://github.com/rust-lang/compiler-team/issues/606 r? `@WaffleLapkin`
This commit is contained in:
commit
0790996a07
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