Refactor to extending from a drain instead of while looping.
This commit is contained in:
parent
7221b07a07
commit
c9e6089d29
@ -453,9 +453,7 @@ pub fn parse(sess: &ParseSess, rdr: TtReader, ms: &[TokenTree]) -> NamedParseRes
|
||||
return Failure(parser.span, parser.token);
|
||||
} else if !next_eis.is_empty() {
|
||||
/* Now process the next token */
|
||||
while !next_eis.is_empty() {
|
||||
cur_eis.push(next_eis.pop().unwrap());
|
||||
}
|
||||
cur_eis.extend(next_eis.drain(..));
|
||||
parser.bump();
|
||||
} else /* bb_eis.len() == 1 */ {
|
||||
let mut ei = bb_eis.pop().unwrap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user