chore: clean up scheduler code

This commit is contained in:
Jonathan Kelley committed 2022-11-09 10:58:11 -08:00
1 parent c096057dd3
commit f5bc137f01
17 files changed
+439 -294

No files matched your search

+9 -1
View File
@@ -80,7 +80,6 @@ impl ScopeState {
where
P: Properties + 'a,
{
let props = self.bump().alloc(props);
let as_component = component;
let vcomp = VComponentProps::new(as_component, P::memoize, props);
let as_dyn = self.bump().alloc(vcomp) as &mut dyn AnyProps;
@@ -136,6 +135,15 @@ pub enum RenderReturn<'a> {
Async(BumpBox<'a, dyn Future<Output = Element<'a>> + 'a>),
}
impl<'a> RenderReturn<'a> {
pub(crate) unsafe fn extend_lifetime_ref<'c>(&self) -> &'c RenderReturn<'c> {
unsafe { std::mem::transmute(self) }
}
pub(crate) unsafe fn extend_lifetime<'c>(self) -> RenderReturn<'c> {
unsafe { std::mem::transmute(self) }
}
}
pub type FiberLeaf<'a> = Pin<BumpBox<'a, dyn Future<Output = Element<'a>> + 'a>>;
pub trait IntoVnode<'a, A = ()> {