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 val = use_signal(|| String::from("0"));
let input_digit = move |num: u8| {
if *val() == "0" {
if val.cloned() == "0" {
val.set(String::new());
}
@@ -94,7 +94,7 @@ fn app() -> Element {
class: "calculator-key key-percent",
onclick: move |_| {
val.set(
format!("{}", calc_val(val().as_str()) / 100.0)
format!("{}", calc_val(val.cloned().as_str()) / 100.0)
);
},
"%"