mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
clippy: Fix unnecessary_cast
warnings in components/script
(#31823)
* clippy: Fix unnecessary cast warnings * clippy: Replace redundant field names with their shorthand alternatives * clippy: Delete struct pattern dereferencings
This commit is contained in:
parent
3e9b808938
commit
bae77671f8
21 changed files with 32 additions and 45 deletions
|
@ -172,7 +172,7 @@ impl ChildrenList {
|
|||
pub fn item(&self, index: u32) -> Option<DomRoot<Node>> {
|
||||
// This always start traversing the children from the closest element
|
||||
// among parent's first and last children and the last visited one.
|
||||
let len = self.len() as u32;
|
||||
let len = self.len();
|
||||
if index >= len {
|
||||
return None;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue