Fix dummy store tree retrieval

This commit is contained in:
Joscha 2022-06-14 09:34:22 +02:00
parent 73582c3d1f
commit b96ade872f
2 changed files with 6 additions and 5 deletions

View file

@ -82,10 +82,10 @@ impl DummyStore {
fn collect_tree(&self, id: usize, result: &mut Vec<DummyMsg>) {
if let Some(msg) = self.msgs.get(&id) {
result.push(msg.clone());
if let Some(children) = self.children.get(&id) {
for child in children {
self.collect_tree(*child, result);
}
}
if let Some(children) = self.children.get(&id) {
for child in children {
self.collect_tree(*child, result);
}
}
}