diff --git a/compiler/fmt/src/spaces.rs b/compiler/fmt/src/spaces.rs index 980e7d9362..8fd5752925 100644 --- a/compiler/fmt/src/spaces.rs +++ b/compiler/fmt/src/spaces.rs @@ -101,9 +101,7 @@ where { use self::CommentOrNewline::*; - let mut iter = spaces.peekable(); - - while let Some(space) = iter.next() { + for space in spaces { match space { Newline => {} LineComment(comment) => {