Skip to content

Commit

Permalink
doc_comment: consume vector instead of iterating and collecting it
Browse files Browse the repository at this point in the history
  • Loading branch information
klensy committed Dec 10, 2021
1 parent 9f100ba commit 12f9352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ fn doc_comment(input: Cursor) -> PResult<Vec<TokenTree>> {
for tt in &mut stream {
tt.set_span(span);
}
let group = Group::new(Delimiter::Bracket, stream.into_iter().collect());
let group = Group::new(Delimiter::Bracket, TokenStream { inner: stream });
trees.push(crate::Group::_new_stable(group).into());
for tt in &mut trees {
tt.set_span(span);
Expand Down

0 comments on commit 12f9352

Please sign in to comment.