From b9aad5e8f411442846baab39e11194c04731c72a Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Tue, 6 Dec 2022 15:37:06 -0800 Subject: [PATCH] chore: help resolve conflicts --- packages/core/src/arena.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/core/src/arena.rs b/packages/core/src/arena.rs index de75195a0..9b34a3653 100644 --- a/packages/core/src/arena.rs +++ b/packages/core/src/arena.rs @@ -83,13 +83,13 @@ impl VirtualDom { self.scopes[id.0].props.take(); + let scope = &mut self.scopes[id.0]; + // Drop all the hooks once the children are dropped // this means we'll drop hooks bottom-up - self.scopes[id.0] - .hook_list - .get_mut() - .drain(..) - .for_each(|hook| drop(unsafe { BumpBox::from_raw(hook) })); + for hook in scope.hook_list.get_mut().drain(..) { + drop(unsafe { BumpBox::from_raw(hook) }); + } } fn drop_scope_inner(&mut self, node: &VNode) {