1
Fork 0

use CursorRef more, to not to clone Trees

This commit is contained in:
klensy 2022-05-16 18:58:15 +03:00
parent 10b3a0d209
commit cc5f3e21ac
10 changed files with 35 additions and 24 deletions

View file

@ -550,9 +550,9 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
fn print_tts(&mut self, tts: &TokenStream, convert_dollar_crate: bool) {
let mut iter = tts.trees().peekable();
while let Some(tt) = iter.next() {
self.print_tt(&tt, convert_dollar_crate);
self.print_tt(tt, convert_dollar_crate);
if let Some(next) = iter.peek() {
if tt_prepend_space(next, &tt) {
if tt_prepend_space(next, tt) {
self.space();
}
}