Skip to content

Commit

Permalink
refactor(code): change "lines" init to be with capacity
Browse files Browse the repository at this point in the history
this probably does not change much
  • Loading branch information
hasezoey committed Oct 30, 2023
1 parent 7fc95ce commit e912cd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ impl<'a> Struct<'a> {
}
};

let mut lines = vec![];
let mut lines = Vec::with_capacity(fields.len());
for mut f in fields.into_iter() {
let field_name = &f.name;

Expand Down

0 comments on commit e912cd2

Please sign in to comment.