diff --git a/packages/core/src/arena.rs b/packages/core/src/arena.rs
index e5440fd85..a11fc69ba 100644
--- a/packages/core/src/arena.rs
+++ b/packages/core/src/arena.rs
@@ -160,8 +160,8 @@ impl VirtualDom {
AttributeValue::Listener(l) => {
_ = l.take();
}
- AttributeValue::Any(_) => {
- todo!()
+ AttributeValue::Any(a) => {
+ _ = a.take();
}
_ => (),
}
diff --git a/packages/core/src/lib.rs b/packages/core/src/lib.rs
index 4e26f5a56..c4f162580 100644
--- a/packages/core/src/lib.rs
+++ b/packages/core/src/lib.rs
@@ -81,9 +81,9 @@ pub use crate::innerlude::{
/// This includes types like [`Scope`], [`Element`], and [`Component`].
pub mod prelude {
pub use crate::innerlude::{
- fc_to_builder, Component, Element, Event, EventHandler, Fragment, IntoAttributeValue,
- LazyNodes, Properties, Scope, ScopeId, ScopeState, Scoped, TaskId, Template,
- TemplateAttribute, TemplateNode, Throw, VNode, VirtualDom,
+ fc_to_builder, AnyValue, Component, Element, Event, EventHandler, Fragment,
+ IntoAttributeValue, LazyNodes, Properties, Scope, ScopeId, ScopeState, Scoped, TaskId,
+ Template, TemplateAttribute, TemplateNode, Throw, VNode, VirtualDom,
};
}
diff --git a/packages/core/src/mutations.rs b/packages/core/src/mutations.rs
index b02e89581..551069c45 100644
--- a/packages/core/src/mutations.rs
+++ b/packages/core/src/mutations.rs
@@ -48,20 +48,7 @@ impl<'a> Mutations<'a> {
/// Push a new mutation into the dom_edits list
pub(crate) fn push(&mut self, mutation: Mutation<'static>) {
- self.edits.push(mutation.downcast_lifetime())
- }
-}
-
-impl Mutations<'static> {
- pub(crate) fn take<'a>(&mut self) -> Mutations<'a> {
- Mutations::<'a> {
- subtree: self.subtree,
- dirty_scopes: self.dirty_scopes.drain().collect(),
- templates: self.templates.split_off(0),
- // Safety: this downcasts the lifetime from 'static to 'a
- // This is safe because 'static outlives 'a
- edits: unsafe { std::mem::transmute(self.edits.split_off(0)) },
- }
+ self.edits.push(mutation)
}
}
@@ -257,9 +244,3 @@ pub enum Mutation<'a> {
id: ElementId,
},
}
-
-impl Mutation<'static> {
- pub(crate) fn downcast_lifetime<'a>(self) -> Mutation<'a> {
- unsafe { std::mem::transmute(self) }
- }
-}
diff --git a/packages/core/src/nodes.rs b/packages/core/src/nodes.rs
index d17863c20..bb9f6734b 100644
--- a/packages/core/src/nodes.rs
+++ b/packages/core/src/nodes.rs
@@ -5,7 +5,7 @@ use bumpalo::boxed::Box as BumpBox;
use bumpalo::Bump;
use std::{
any::{Any, TypeId},
- cell::{Cell, RefCell, UnsafeCell},
+ cell::{self, Cell, RefCell, UnsafeCell},
fmt::{Arguments, Debug},
future::Future,
};
@@ -523,7 +523,7 @@ pub enum AttributeValue<'a> {
Listener(RefCell