fixed type error, yay!

This commit is contained in:
AJ ONeal 2018-10-01 22:31:05 -06:00
parent 912624a132
commit ebf0a89406
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ fn main() {
let stream = stream.unwrap(); let stream = stream.unwrap();
let counter = Arc::clone(&counter); let counter = Arc::clone(&counter);
tasks.queue(move || { tasks.run(move || {
{ {
// in a subscope to release borrow automatically // in a subscope to release borrow automatically
let mut count = counter.lock().unwrap(); let mut count = counter.lock().unwrap();

View File

@ -12,7 +12,7 @@ impl<F: FnOnce()> FnBox for F {
} }
} }
type Job = Box<dyn FnOnce() + Send + 'static>; type Job = Box<dyn FnBox + Send + 'static>;
struct Worker { struct Worker {
id: usize, id: usize,