fixed type error, yay!
This commit is contained in:
parent
912624a132
commit
ebf0a89406
|
@ -19,7 +19,7 @@ fn main() {
|
|||
let stream = stream.unwrap();
|
||||
let counter = Arc::clone(&counter);
|
||||
|
||||
tasks.queue(move || {
|
||||
tasks.run(move || {
|
||||
{
|
||||
// in a subscope to release borrow automatically
|
||||
let mut count = counter.lock().unwrap();
|
||||
|
|
|
@ -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 {
|
||||
id: usize,
|
||||
|
|
Loading…
Reference in New Issue