fix: get miri passing

This commit is contained in:
Jonathan Kelley committed 2022-12-16 20:26:04 -08:00
1 parent 4d73ffa361
commit 261d688b6e
4 files changed
+30 -13

No files matched your search

+7 -2
View File
@@ -25,7 +25,8 @@ use crate::{innerlude::VNode, ScopeState};
/// LazyNodes::new(|f| f.element("div", [], [], [] None))
/// ```
pub struct LazyNodes<'a, 'b> {
inner: SmallBox<dyn FnMut(&'a ScopeState) -> VNode<'a> + 'b, S16>,
inner: Box<dyn FnMut(&'a ScopeState) -> VNode<'a> + 'b>,
// inner: SmallBox<dyn FnMut(&'a ScopeState) -> VNode<'a> + 'b, S16>,
}
impl<'a, 'b> LazyNodes<'a, 'b> {
@@ -39,10 +40,14 @@ impl<'a, 'b> LazyNodes<'a, 'b> {
let mut slot = Some(val);
Self {
inner: smallbox!(move |f| {
inner: Box::new(move |f| {
let val = slot.take().expect("cannot call LazyNodes twice");
val(f)
}),
// inner: smallbox!(move |f| {
// let val = slot.take().expect("cannot call LazyNodes twice");
// val(f)
// }),
}
}