This commit is contained in:
J.Teeuwissen 2023-04-29 17:59:17 +02:00
parent 231feb2fe2
commit 042482a19f
No known key found for this signature in database
GPG key ID: DB5F7A1ED8D478AD
3 changed files with 35 additions and 35 deletions

View file

@ -1227,16 +1227,11 @@ impl<'a> DropSpecializationEnvironment<'a> {
}
fn add_list_child(&mut self, parent: Parent, child: Child, index: &Symbol) {
match self.symbol_index.get(index) {
Some(index) => {
self.list_children
.entry(parent)
.or_insert_with(|| Vec::new_in(self.arena))
.push((child, *index));
}
None => {
// List index is not constant, so we don't know the index of the child.
}
if let Some(index) = self.symbol_index.get(index) {
self.list_children
.entry(parent)
.or_insert_with(|| Vec::new_in(self.arena))
.push((child, *index));
}
}