Use ThinVec in ast::WhereClause.

This commit is contained in:
Nicholas Nethercote 2022-11-22 16:23:25 +11:00
parent dd7aff5cc5
commit 068db466e8
6 changed files with 92 additions and 76 deletions

View file

@ -258,7 +258,7 @@ impl<'a> Parser<'a> {
params,
where_clause: WhereClause {
has_where_token: false,
predicates: Vec::new(),
predicates: ThinVec::new(),
span: self.prev_token.span.shrink_to_hi(),
},
span,
@ -288,7 +288,7 @@ impl<'a> Parser<'a> {
) -> PResult<'a, (WhereClause, Option<Vec<ast::FieldDef>>)> {
let mut where_clause = WhereClause {
has_where_token: false,
predicates: Vec::new(),
predicates: ThinVec::new(),
span: self.prev_token.span.shrink_to_hi(),
};
let mut tuple_struct_body = None;