fix(rust): adapt to new nightly iterator lints

This commit is contained in:
Will Lillis 2025-06-07 03:12:28 -04:00
parent aed8b8b32c
commit 21b38004da
2 changed files with 9 additions and 5 deletions

View file

@ -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
}

View file

@ -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 {