]> git.lizzy.rs Git - rust.git/blobdiff - crates/tt/src/lib.rs
Merge #7907
[rust.git] / crates / tt / src / lib.rs
index 9d9a01e30a9a2d821a0f1294cfc47a345d7ef80c..bed44d60058afeaee6213ff604deb73ead51434e 100644 (file)
@@ -239,9 +239,8 @@ pub fn as_debug_string(&self) -> String {
 
         let mut res = String::new();
         res.push_str(delim.0);
-        let mut iter = self.token_trees.iter();
         let mut last = None;
-        while let Some(child) = iter.next() {
+        for child in &self.token_trees {
             let s = match child {
                 TokenTree::Leaf(it) => {
                     let s = match it {