Skip to content

Commit e97825e

Browse files
committed
Shrink ast::Attribute.
1 parent 76be14b commit e97825e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/skip.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ fn get_skip_names(kind: &str, attrs: &[ast::Attribute]) -> Vec<String> {
5858
for attr in attrs {
5959
// rustc_ast::ast::Path is implemented partialEq
6060
// but it is designed for segments.len() == 1
61-
if let ast::AttrKind::Normal(attr_item, _) = &attr.kind {
62-
if pprust::path_to_string(&attr_item.path) != path {
61+
if let ast::AttrKind::Normal(normal) = &attr.kind {
62+
if pprust::path_to_string(&normal.item.path) != path {
6363
continue;
6464
}
6565
}

src/visitor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,8 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
811811
);
812812
} else {
813813
match &attr.kind {
814-
ast::AttrKind::Normal(ref attribute_item, _)
815-
if self.is_unknown_rustfmt_attr(&attribute_item.path.segments) =>
814+
ast::AttrKind::Normal(ref normal)
815+
if self.is_unknown_rustfmt_attr(&normal.item.path.segments) =>
816816
{
817817
let file_name = self.parse_sess.span_to_filename(attr.span);
818818
self.report.append(

0 commit comments

Comments
 (0)