1
Fork 0

Reserve space in advance

This commit is contained in:
Dániel Buga 2020-10-16 11:43:39 +02:00
parent 2ca0b85593
commit a7f2bb6343
4 changed files with 9 additions and 7 deletions

View file

@ -66,7 +66,7 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
let fmt = substr.nonself_args[0].clone();
let mut stmts = vec![];
let mut stmts = Vec::with_capacity(fields.len() + 2);
match vdata {
ast::VariantData::Tuple(..) | ast::VariantData::Unit(..) => {
// tuple struct/"normal" variant