wip: back to vnode enum

This commit is contained in:
Jonathan Kelley committed 2021-08-20 10:34:41 -04:00
1 parent 9652ccdcf1
commit 64f289a61c
6 files changed
+213 -226

No files matched your search

+7 -7
View File
@@ -354,31 +354,31 @@ impl Scheduler {
}
while let Some(node) = garbage_list.pop() {
match &node.kind {
VNodeKind::Text(_) => {
match &node {
VNode::Text(_) => {
self.shared.collect_garbage(node.direct_id());
}
VNodeKind::Anchor(_) => {
VNode::Anchor(_) => {
self.shared.collect_garbage(node.direct_id());
}
VNodeKind::Suspended(_) => {
VNode::Suspended(_) => {
self.shared.collect_garbage(node.direct_id());
}
VNodeKind::Element(el) => {
VNode::Element(el) => {
self.shared.collect_garbage(node.direct_id());
for child in el.children {
garbage_list.push(child);
}
}
VNodeKind::Fragment(frag) => {
VNode::Fragment(frag) => {
for child in frag.children {
garbage_list.push(child);
}
}
VNodeKind::Component(comp) => {
VNode::Component(comp) => {
// TODO: run the hook destructors and then even delete the scope
let scope_id = comp.ass_scope.get().unwrap();