1
Fork 0

Use optimized SmallVec implementation

This commit is contained in:
Igor Gutorov 2018-08-13 22:15:16 +03:00
parent e73077e106
commit 4d81fe9243
46 changed files with 156 additions and 434 deletions

View file

@ -644,7 +644,7 @@ pub fn parse(
// This MatcherPos instance is allocated on the stack. All others -- and
// there are frequently *no* others! -- are allocated on the heap.
let mut initial = initial_matcher_pos(ms, parser.span.lo());
let mut cur_items = OneVector::one(MatcherPosHandle::Ref(&mut initial));
let mut cur_items = smallvec![MatcherPosHandle::Ref(&mut initial)];
let mut next_items = Vec::new();
loop {