refactor: add chunks method to TokenStream to obviate rustdoc clones
This commit is contained in:
parent
2c41369acc
commit
00c3f7552e
2 changed files with 5 additions and 2 deletions
|
@ -551,6 +551,10 @@ impl TokenStream {
|
|||
vec_mut.extend(stream_iter);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn chunks(&self, chunk_size: usize) -> core::slice::Chunks<'_, TokenTree> {
|
||||
self.0.chunks(chunk_size)
|
||||
}
|
||||
}
|
||||
|
||||
/// By-reference iterator over a [`TokenStream`], that produces `&TokenTree`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue