runtime: use Vec::with_capacity when building runtime (#4553)

This commit is contained in:
Alex Saveau
2022-03-02 12:41:43 +01:00
committed by GitHub
parent 6f9a586214
commit fb9a01b362
+3 -3
View File
@@ -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 {