Make clippy happy

This commit is contained in:
Jonathan Kelley committed 2024-01-10 23:26:26 -08:00
1 parent 593527d58b
commit b8061d6d14
8 files changed
+20 -23

No files matched your search

+4 -2
View File
@@ -22,8 +22,10 @@ fn app(cx: Scope) -> Element {
button {
onclick: move |_| {
if let Some(header) = header_element.read().as_ref() {
_ = header.scroll_to(ScrollBehavior::Smooth);
if let Some(header) = header_element.read().as_ref().cloned() {
cx.spawn(async move {
let _ = header.scroll_to(ScrollBehavior::Smooth).await;
});
}
},
"Scroll to top"