mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
runtime: use Vec::with_capacity
when building runtime (#4553)
This commit is contained in:
parent
6f9a586214
commit
fb9a01b362
@ -194,9 +194,9 @@ pub(super) fn create(
|
||||
before_park: Option<Callback>,
|
||||
after_unpark: Option<Callback>,
|
||||
) -> (Arc<Shared>, Launch) {
|
||||
let mut cores = vec![];
|
||||
let mut remotes = vec![];
|
||||
let mut worker_metrics = vec![];
|
||||
let mut cores = Vec::with_capacity(size);
|
||||
let mut remotes = Vec::with_capacity(size);
|
||||
let mut worker_metrics = Vec::with_capacity(size);
|
||||
|
||||
// Create the local queues
|
||||
for _ in 0..size {
|
||||
|
Loading…
x
Reference in New Issue
Block a user