Feat: props now autoderives its own trait

This commit is contained in:
Jonathan Kelley committed 2021-03-12 15:41:36 -05:00
1 parent d4f1ceaffb
commit b3c96a5996
10 files changed
+123 -83

No files matched your search

+3
View File
@@ -97,6 +97,8 @@ impl Scope {
// To make sure that the lifetime isn't truly broken, we receive a Weak RC so we can't keep it around after the parent dies.
// This should never happen, but is a good check to keep around
pub fn new<'creator_node>(
// pub fn new(
// caller: Weak<dyn Fn(Context) -> DomTree + 'static>,
caller: Weak<dyn Fn(Context) -> DomTree + 'creator_node>,
myidx: ScopeIdx,
parent: Option<ScopeIdx>,
@@ -106,6 +108,7 @@ impl Scope {
let broken_caller: Weak<dyn Fn(Context) -> DomTree + 'static> =
unsafe { std::mem::transmute(caller) };
// let broken_caller = caller;
Self {
caller: broken_caller,
hook_arena: typed_arena::Arena::new(),