fix clippy on zoom example

This commit is contained in:
Jonathan Kelley 2024-07-10 12:50:57 -07:00
parent 69d7098d0e
commit 2e8af5fc62
No known key found for this signature in database
GPG key ID: 1FBB50F7EB0A08BE

View file

@ -13,14 +13,14 @@ fn app() -> Element {
rsx! { rsx! {
h1 { "Zoom level: {level}" } h1 { "Zoom level: {level}" }
p { "Change the zoom level of the webview by typing a number in the input below."} p { "Change the zoom level of the webview by typing a number in the input below." }
input { input {
r#type: "number", r#type: "number",
value: "{level}", value: "{level}",
oninput: move |e| { oninput: move |e| {
if let Ok(new_zoom) = e.value().parse::<f64>() { if let Ok(new_zoom) = e.value().parse::<f64>() {
level.set(new_zoom); level.set(new_zoom);
dioxus::desktop::window().webview.zoom(new_zoom); _ = dioxus::desktop::window().webview.zoom(new_zoom);
} }
} }
} }