Cleanup code that was warned by rust-clippy

This commit is contained in:
Corey Farwell 2015-10-11 20:47:45 -04:00
parent 9c1cb9f61e
commit 81e034885b
9 changed files with 273 additions and 284 deletions

View file

@ -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(());
}
}
}