diff --git a/crates/cli/src/tests/helpers/query_helpers.rs b/crates/cli/src/tests/helpers/query_helpers.rs index bab0b891..bc5617e8 100644 --- a/crates/cli/src/tests/helpers/query_helpers.rs +++ b/crates/cli/src/tests/helpers/query_helpers.rs @@ -182,7 +182,9 @@ impl Pattern { } matches.sort_unstable(); - matches.iter_mut().for_each(|m| m.last_node = None); + for m in &mut matches { + m.last_node = None; + } matches.dedup(); matches } diff --git a/crates/highlight/src/highlight.rs b/crates/highlight/src/highlight.rs index 9d296050..1f76bfc3 100644 --- a/crates/highlight/src/highlight.rs +++ b/crates/highlight/src/highlight.rs @@ -1222,12 +1222,14 @@ impl HtmlRenderer { // At line boundaries, close and re-open all of the open tags. if c == b'\n' { - highlights.iter().for_each(|_| self.end_highlight()); + for _ in highlights { + self.end_highlight(); + } self.html.push(c); self.line_offsets.push(self.html.len() as u32); - highlights - .iter() - .for_each(|scope| self.start_highlight(*scope, attribute_callback)); + for scope in highlights { + self.start_highlight(*scope, attribute_callback); + } } else if let Some(escape) = html_escape(c) { self.html.extend_from_slice(escape); } else {