diff --git a/src/threadpool.rs b/src/threadpool.rs index 637fb6d..f5c8b8d 100644 --- a/src/threadpool.rs +++ b/src/threadpool.rs @@ -121,8 +121,7 @@ impl ThreadPoolManager { where T: Iterator, { - let mut split = Vec::new(); - split.reserve_exact(self.num_threads); + let mut split = Vec::with_capacity(self.num_threads); for _ in 0..self.num_threads { split.push(Vec::new()); }