mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +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>,
|
before_park: Option<Callback>,
|
||||||
after_unpark: Option<Callback>,
|
after_unpark: Option<Callback>,
|
||||||
) -> (Arc<Shared>, Launch) {
|
) -> (Arc<Shared>, Launch) {
|
||||||
let mut cores = vec![];
|
let mut cores = Vec::with_capacity(size);
|
||||||
let mut remotes = vec![];
|
let mut remotes = Vec::with_capacity(size);
|
||||||
let mut worker_metrics = vec![];
|
let mut worker_metrics = Vec::with_capacity(size);
|
||||||
|
|
||||||
// Create the local queues
|
// Create the local queues
|
||||||
for _ in 0..size {
|
for _ in 0..size {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user