wip: refactor to fix some ownership quirks
This commit is contained in:
1 parent
3bf19d8106
commit
05e960b6b0
16 files changed
+549
-535
No files matched your search
@@ -5,7 +5,7 @@ use crate::innerlude::*;
|
||||
/// This iterator is useful when it's important to load the next real root onto the top of the stack for operations like
|
||||
/// "InsertBefore".
|
||||
pub struct RealChildIterator<'a> {
|
||||
scopes: &'a SharedResources,
|
||||
scopes: &'a Scheduler,
|
||||
|
||||
// Heuristcally we should never bleed into 4 completely nested fragments/components
|
||||
// Smallvec lets us stack allocate our little stack machine so the vast majority of cases are sane
|
||||
@@ -14,14 +14,14 @@ pub struct RealChildIterator<'a> {
|
||||
}
|
||||
|
||||
impl<'a> RealChildIterator<'a> {
|
||||
pub fn new(starter: &'a VNode<'a>, scopes: &'a SharedResources) -> Self {
|
||||
pub fn new(starter: &'a VNode<'a>, scopes: &'a Scheduler) -> Self {
|
||||
Self {
|
||||
scopes,
|
||||
stack: smallvec::smallvec![(0, starter)],
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_from_slice(nodes: &'a [VNode<'a>], scopes: &'a SharedResources) -> Self {
|
||||
pub fn new_from_slice(nodes: &'a [VNode<'a>], scopes: &'a Scheduler) -> Self {
|
||||
let mut stack = smallvec::smallvec![];
|
||||
for node in nodes {
|
||||
stack.push((0, node));
|
||||
|
||||
Reference in new issue
Block a user