Experiment with call syntax only working for copy types

This commit is contained in:
Jonathan Kelley committed 2024-01-15 21:12:44 -08:00
1 parent bb750f5336
commit 33bba24867
19 files changed
+52 -76

No files matched your search

+2 -2
View File
@@ -22,7 +22,7 @@ fn app() -> Element {
let open_compose_window = move |evt: MouseEvent| {
let tx = handle.tx();
dioxus_desktop::window().new_window(
VirtualDom::new_with_props(compose, Rc::new(move |s| tx.unbounded_send(s))),
VirtualDom::new_with_props(compose, Rc::new(move |s| tx.unbounded_send(s).unwrap())),
Default::default(),
);
};
@@ -50,7 +50,7 @@ fn compose(send: Rc<dyn Fn(String)>) -> Element {
button {
onclick: move |_| {
send(user_input.get().clone());
send(user_input.cloned());
dioxus_desktop::window().close();
},
"Click to send"