avoid reallocations
This commit is contained in:
parent
2463625b68
commit
2fc6d23bec
1 changed files with 1 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue