fix: use annotation method from rust/58052 to fix closure lifetimes

This commit is contained in:
Jonathan Kelley committed 2021-10-30 18:23:28 -04:00
1 parent 9ee2bfb010
commit 27d891934a
15 files changed
+333 -180

No files matched your search

+2 -1
View File
@@ -4,7 +4,8 @@ use dioxus_core::prelude::*;
#[async_std::main]
async fn main() {
static App: FC<()> = |(cx, props)| cx.render(LazyNodes::new(|f| f.text(format_args!("hello"))));
static App: FC<()> =
|(cx, props)| cx.render(Some(Box::new(move |f| f.text(format_args!("hello")))));
let mut dom = VirtualDom::new(App);