Skip to content

Commit

Permalink
remove ref to child id
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmoulton committed May 30, 2024
1 parent 3e89b8c commit 5a45494
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/views/dyn_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ type ChildFn<T> = dyn Fn(T) -> (AnyView, Scope);
/// A container for a dynamically updating View. See [`dyn_container`]
pub struct DynamicContainer<T: 'static> {
id: ViewId,
child_id: ViewId,
child_scope: Scope,
child_fn: Box<ChildFn<T>>,
}
Expand Down Expand Up @@ -72,12 +71,10 @@ pub fn dyn_container<CF: Fn(T) -> IV + 'static, T: 'static, IV: IntoView>(

let child_fn = Box::new(as_child_of_current_scope(move |e| child_fn(e).into_any()));
let (child, child_scope) = child_fn(initial);
let child_id = child.id();
id.set_children(vec![child]);
DynamicContainer {
id,
child_scope,
child_id,
child_fn,
}
}
Expand Down

0 comments on commit 5a45494

Please sign in to comment.