fix lints on rust 1.89 (#4587)

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-08-19 19:34:13 -07:00
1 parent 27bae6fbb7
commit 9ec474962b
16 files changed
+48 -37

No files matched your search

+10 -6
View File
@@ -74,9 +74,11 @@ impl WebHistory {
}
fn scroll_pos(&self) -> ScrollPosition {
self.do_scroll_restoration
.then(|| ScrollPosition::of_window(&self.window))
.unwrap_or_default()
if self.do_scroll_restoration {
ScrollPosition::of_window(&self.window)
} else {
Default::default()
}
}
fn create_state(&self) -> [f64; 2] {
@@ -239,9 +241,11 @@ impl HashHistory {
}
fn scroll_pos(&self) -> ScrollPosition {
self.do_scroll_restoration
.then(|| ScrollPosition::of_window(&self.window))
.unwrap_or_default()
if self.do_scroll_restoration {
ScrollPosition::of_window(&self.window)
} else {
Default::default()
}
}
fn create_state(&self) -> [f64; 2] {