Replace list indexing for .get
(fail-safe)
This commit is contained in:
parent
1cf72183cf
commit
2d572d4a9c
@ -55,7 +55,8 @@ impl LateLintPass<'_> for AllowAttribute {
|
|||||||
.name == sym!(feature);
|
.name == sym!(feature);
|
||||||
if let ast::AttrKind::Normal(normal) = &attr.kind;
|
if let ast::AttrKind::Normal(normal) = &attr.kind;
|
||||||
if let Some(MetaItemKind::List(list)) = normal.item.meta_kind();
|
if let Some(MetaItemKind::List(list)) = normal.item.meta_kind();
|
||||||
if list[0].ident().unwrap().name == sym!(lint_reasons);
|
if let Some(symbol) = list.get(0);
|
||||||
|
if symbol.ident().unwrap().name == sym!(lint_reasons);
|
||||||
then {
|
then {
|
||||||
self.lint_reasons_active = true;
|
self.lint_reasons_active = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user