Skip to content

Commit edf9ce6

Browse files
tool: use Vec::with_capacity constructor
Co-authored-by: Ivan Velickovic <10481259+Ivan-Velickovic@users.noreply.github.com> Signed-off-by: James Archer <j.archer@unsw.edu.au>
1 parent 61af145 commit edf9ce6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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)