avoid reallocations

This commit is contained in:
Данила Горнушко 2024-06-05 13:46:27 +03:00
parent 2463625b68
commit 2fc6d23bec

View file

@ -483,7 +483,7 @@ fn get_stats(port: &mut Box<dyn SerialPort>, id: u32) -> StatsOptions {
};
let split: Vec<&str> = response.split_whitespace().collect();
let mut nums: Vec<u32> = Vec::new();
let mut nums: Vec<u32> = Vec::with_capacity(5);
for i in split {
match i.parse() {