From fcf7617fba17f76d536fa4b12ea2148c93692e76 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 7 Nov 2024 17:00:12 -0500 Subject: [PATCH] fix --- core/src/widget/tree.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/widget/tree.rs b/core/src/widget/tree.rs index f9edd0360d..c15e99ab6a 100644 --- a/core/src/widget/tree.rs +++ b/core/src/widget/tree.rs @@ -306,16 +306,16 @@ impl Tree { HashMap, VecDeque<(usize, &mut Tree)>, ) = self.children.iter_mut().enumerate().fold( - (HashMap::new(), Vec::with_capacity(children_len)), + (HashMap::new(), VecDeque::with_capacity(children_len)), |(mut id_map, mut id_list), (i, c)| { if let Some(id) = c.id.as_ref() { if let Internal::Custom(_, ref name) = id.0 { let _ = id_map.insert(name.to_string(), c); } else { - id_list.push((i, c)); + id_list.push_back((i, c)); } } else { - id_list.push((i, c)); + id_list.push_back((i, c)); } (id_map, id_list) },