mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
clippy: Fix a few problems in components/script
(#31961)
* fixed various clippy warnings * fixed various clippy warnings
This commit is contained in:
parent
52a74287fc
commit
fd8235e409
2 changed files with 2 additions and 2 deletions
|
@ -597,7 +597,7 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
||||||
// Step 7-8
|
// Step 7-8
|
||||||
let mut names_vec: Vec<DOMString> = Vec::new();
|
let mut names_vec: Vec<DOMString> = Vec::new();
|
||||||
for elem in sourced_names_vec.iter() {
|
for elem in sourced_names_vec.iter() {
|
||||||
if names_vec.iter().find(|name| **name == *elem.name).is_none() {
|
if !names_vec.iter().any(|name| *name == *elem.name) {
|
||||||
names_vec.push(DOMString::from(&*elem.name));
|
names_vec.push(DOMString::from(&*elem.name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1183,7 +1183,7 @@ impl HTMLInputElementMethods for HTMLInputElement {
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-input-files
|
// https://html.spec.whatwg.org/multipage/#dom-input-files
|
||||||
fn GetFiles(&self) -> Option<DomRoot<FileList>> {
|
fn GetFiles(&self) -> Option<DomRoot<FileList>> {
|
||||||
self.filelist.get().as_ref().map(|fl| fl.clone())
|
self.filelist.get().as_ref().cloned()
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-input-defaultchecked
|
// https://html.spec.whatwg.org/multipage/#dom-input-defaultchecked
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue