Rollup merge of #115596 - nnethercote:two-small-changes, r=lqd

A small change

A small change I made while poking around the code.

r? `@lqd`
This commit is contained in:
Matthias Krüger 2023-09-06 19:31:50 +02:00 committed by GitHub
commit da44234b64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,7 @@ fn to_attr_token_stream(&self) -> AttrTokenStream {
let mut cursor_snapshot = self.cursor_snapshot.clone();
let tokens =
std::iter::once((FlatToken::Token(self.start_token.0.clone()), self.start_token.1))
.chain((0..self.num_calls).map(|_| {
.chain(std::iter::repeat_with(|| {
let token = cursor_snapshot.next();
(FlatToken::Token(token.0), token.1)
}))