rustc_hir: don't open-code Iterator::eq
This commit is contained in:
parent
3802225884
commit
1d4a419a6b
1 changed files with 1 additions and 4 deletions
|
@ -1101,10 +1101,7 @@ impl AttributeExt for Attribute {
|
|||
|
||||
fn path_matches(&self, name: &[Symbol]) -> bool {
|
||||
match &self.kind {
|
||||
AttrKind::Normal(n) => {
|
||||
n.path.segments.len() == name.len()
|
||||
&& n.path.segments.iter().zip(name).all(|(s, n)| s.name == *n)
|
||||
}
|
||||
AttrKind::Normal(n) => n.path.segments.iter().map(|segment| &segment.name).eq(name),
|
||||
AttrKind::DocComment(..) => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue