wip: try to get lifetimes passed in properly

This commit is contained in:
Jonathan Kelley committed 2021-10-30 20:28:58 -04:00
1 parent 27d891934a
commit f70b5b4e4a
6 files changed
+312 -184

No files matched your search

+7
View File
@@ -4,6 +4,8 @@
//!
//! We unsafely implement `send` for the VirtualDom, but those guarantees can only be
use bumpalo::Bump;
use crate::innerlude::*;
use std::{any::TypeId, ops::Deref, rc::Rc};
@@ -122,6 +124,11 @@ impl<'src> Context<'src> {
self.scope.our_arena_idx
}
pub fn bump(&self) -> &'src Bump {
let bump = &self.scope.frames.wip_frame().bump;
bump
}
/// Take a lazy VNode structure and actually build it with the context of the VDom's efficient VNode allocator.
///
/// This function consumes the context and absorb the lifetime, so these VNodes *must* be returned.