Use Iterator::eq and (dogfood) eq_by in compiler and library
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user