Use Iterator::eq and (dogfood) eq_by in compiler and library

This commit is contained in:
Yotam Ofek
2025-09-27 20:57:50 +03:00
parent f957826bff
commit 68a7c25078
17 changed files with 20 additions and 33 deletions

View File

@@ -15,7 +15,7 @@ fn sp(a: u32, b: u32) -> Span {
}
fn cmp_token_stream(a: &TokenStream, b: &TokenStream) -> bool {
a.len() == b.len() && a.iter().zip(b.iter()).all(|(x, y)| x.eq_unspanned(y))
a.iter().eq_by(b.iter(), |x, y| x.eq_unspanned(y))
}
#[test]