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

@@ -49,7 +49,7 @@ impl<'a> PathParser<'a> {
}
pub fn segments_is(&self, segments: &[Symbol]) -> bool {
self.len() == segments.len() && self.segments().zip(segments).all(|(a, b)| a.name == *b)
self.segments().map(|segment| &segment.name).eq(segments)
}
pub fn word(&self) -> Option<Ident> {