mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Cleanup code that was warned by rust-clippy
This commit is contained in:
parent
9c1cb9f61e
commit
81e034885b
9 changed files with 273 additions and 284 deletions
|
@ -41,12 +41,8 @@ impl TaskPool {
|
|||
return TaskPool { tx: tx };
|
||||
|
||||
fn worker(rx: &Mutex<Receiver<Box<FnBox() + Send + 'static>>>) {
|
||||
loop {
|
||||
let job = rx.lock().unwrap().recv();
|
||||
match job {
|
||||
Ok(job) => job.call_box(()),
|
||||
Err(..) => break,
|
||||
}
|
||||
while let Ok(job) = rx.lock().unwrap().recv() {
|
||||
job.call_box(());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue