mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-02-02 10:54:15 -05:00
chore: clippy
This commit is contained in:
parent
fb2103f314
commit
1d674c714a
1 changed files with 4 additions and 8 deletions
|
@ -66,14 +66,10 @@ where
|
||||||
move |entries, _| {
|
move |entries, _| {
|
||||||
// In some circumstances Chrome passes a first (or only) entry which has a zero bounding client rect
|
// In some circumstances Chrome passes a first (or only) entry which has a zero bounding client rect
|
||||||
// and returns `is_intersecting` erroneously as `false`.
|
// and returns `is_intersecting` erroneously as `false`.
|
||||||
if let Some(entry) = entries
|
if let Some(entry) = entries.into_iter().find(|entry| {
|
||||||
.into_iter()
|
|
||||||
.filter(|entry| {
|
|
||||||
let rect = entry.bounding_client_rect();
|
let rect = entry.bounding_client_rect();
|
||||||
rect.width() > 0.0 || rect.height() > 0.0
|
rect.width() > 0.0 || rect.height() > 0.0
|
||||||
})
|
}) {
|
||||||
.next()
|
|
||||||
{
|
|
||||||
set_visible.set(entry.is_intersecting());
|
set_visible.set(entry.is_intersecting());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue