mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
clippy: fix warnings in components/script (#32023)
This commit is contained in:
parent
8d513cf4c7
commit
581913f77e
3 changed files with 18 additions and 19 deletions
|
@ -2826,7 +2826,7 @@ impl GlobalScope {
|
|||
},
|
||||
_ => {
|
||||
p.reject_error(Error::NotSupported);
|
||||
return p;
|
||||
p
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -708,11 +708,10 @@ impl HTMLInputElement {
|
|||
},
|
||||
};
|
||||
} else {
|
||||
value = value +
|
||||
match dir {
|
||||
StepDirection::Down => -f64::from(n) * allowed_value_step,
|
||||
StepDirection::Up => f64::from(n) * allowed_value_step,
|
||||
};
|
||||
value += match dir {
|
||||
StepDirection::Down => -f64::from(n) * allowed_value_step,
|
||||
StepDirection::Up => f64::from(n) * allowed_value_step,
|
||||
};
|
||||
}
|
||||
|
||||
// Step 8
|
||||
|
@ -2085,8 +2084,7 @@ impl HTMLInputElement {
|
|||
if self.upcast::<Element>().click_in_progress() {
|
||||
return;
|
||||
}
|
||||
let submit_button;
|
||||
submit_button = node
|
||||
let submit_button = node
|
||||
.query_selector_iter(DOMString::from("input[type=submit]"))
|
||||
.unwrap()
|
||||
.filter_map(DomRoot::downcast::<HTMLInputElement>)
|
||||
|
@ -2102,7 +2100,7 @@ impl HTMLInputElement {
|
|||
}
|
||||
},
|
||||
None => {
|
||||
let inputs = node
|
||||
let mut inputs = node
|
||||
.query_selector_iter(DOMString::from("input"))
|
||||
.unwrap()
|
||||
.filter_map(DomRoot::downcast::<HTMLInputElement>)
|
||||
|
@ -2125,7 +2123,7 @@ impl HTMLInputElement {
|
|||
)
|
||||
});
|
||||
|
||||
if inputs.skip(1).next().is_some() {
|
||||
if inputs.nth(1).is_some() {
|
||||
// lazily test for > 1 submission-blocking inputs
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -497,17 +497,18 @@ impl ServiceWorkerManagerFactory for ServiceWorkerManager {
|
|||
let from_constellation = ROUTER.route_ipc_receiver_to_new_crossbeam_receiver(receiver);
|
||||
let resource_port = ROUTER.route_ipc_receiver_to_new_crossbeam_receiver(resource_port);
|
||||
let _ = resource_sender.send(CoreResourceMsg::NetworkMediator(resource_chan, origin));
|
||||
let swmanager_thread = move || {
|
||||
ServiceWorkerManager::new(
|
||||
own_sender,
|
||||
from_constellation,
|
||||
resource_port,
|
||||
constellation_sender,
|
||||
)
|
||||
.handle_message()
|
||||
};
|
||||
if thread::Builder::new()
|
||||
.name("SvcWorkerManager".to_owned())
|
||||
.spawn(move || {
|
||||
ServiceWorkerManager::new(
|
||||
own_sender,
|
||||
from_constellation,
|
||||
resource_port,
|
||||
constellation_sender,
|
||||
)
|
||||
.handle_message();
|
||||
})
|
||||
.spawn(swmanager_thread)
|
||||
.is_err()
|
||||
{
|
||||
warn!("ServiceWorkerManager thread spawning failed");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue