Experiment with call syntax only working for copy types
This commit is contained in:
19 files changed
+52
-76
No files matched your search
+2
-2
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user