Skip to content

Commit

Permalink
Refactor to extending from a drain instead of while looping.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Nov 12, 2016
1 parent 7221b07 commit c9e6089
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/libsyntax/ext/tt/macro_parser.rs
Expand Up @@ -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();
Expand Down

0 comments on commit c9e6089

Please sign in to comment.