Skip to content

Commit d758d6d

Browse files
committed
tool: use Vec::with_capacity constructor
Signed-off-by: James Archer <j.archer@unsw.edu.au>
1 parent 61af145 commit d758d6d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tool/microkit/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3404,8 +3404,7 @@ fn main() -> Result<(), String> {
34043404
&(schedule.len() as u64).to_le_bytes(),
34053405
)?;
34063406

3407-
let mut out = Vec::new();
3408-
out.reserve_exact(schedule.len() * 16);
3407+
let mut out = Vec::with_capacity(schedule.len() * 16);
34093408

34103409
for timeslice in schedule.iter() {
34113410
out.extend(timeslice.id.to_le_bytes());

0 commit comments

Comments
 (0)