mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
:nth-child and friends, use div_rem result instead of recomputing it
This commit is contained in:
parent
eb76ea76db
commit
6508bff1cd
1 changed files with 1 additions and 1 deletions
|
@ -577,7 +577,7 @@ fn matches_generic_nth_child<N: TreeNode<T>, T: TreeNodeRefAsElement<N, E>, E: E
|
|||
}
|
||||
|
||||
let (n, r) = (index - b).div_rem(&a);
|
||||
n >= 0 && (a * n == index - b)
|
||||
n >= 0 && r == 0
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue