Fix dummy store tree retrieval
This commit is contained in:
parent
73582c3d1f
commit
b96ade872f
2 changed files with 6 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue