File tree 2 files changed +6
-13
lines changed
2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -659,18 +659,15 @@ impl LateLintPass for ImproperCTypes {
659
659
}
660
660
}
661
661
662
- match it. node {
663
- hir:: ItemForeignMod ( ref nmod)
664
- if nmod. abi != abi:: RustIntrinsic &&
665
- nmod. abi != abi:: PlatformIntrinsic => {
662
+ if let hir:: ItemForeignMod ( ref nmod) = it. node {
663
+ if nmod. abi != abi:: RustIntrinsic && nmod. abi != abi:: PlatformIntrinsic {
666
664
for ni in & nmod. items {
667
665
match ni. node {
668
666
hir:: ForeignItemFn ( ref decl, _) => check_foreign_fn ( cx, & * * decl) ,
669
667
hir:: ForeignItemStatic ( ref t, _) => check_ty ( cx, & * * t)
670
668
}
671
669
}
672
670
}
673
- _ => ( ) ,
674
671
}
675
672
}
676
673
}
Original file line number Diff line number Diff line change @@ -220,15 +220,11 @@ impl LintPass for PathStatements {
220
220
221
221
impl LateLintPass for PathStatements {
222
222
fn check_stmt ( & mut self , cx : & LateContext , s : & hir:: Stmt ) {
223
- match s. node {
224
- hir:: StmtSemi ( ref expr, _) => {
225
- match expr. node {
226
- hir:: ExprPath ( ..) => cx. span_lint ( PATH_STATEMENTS , s. span ,
227
- "path statement with no effect" ) ,
228
- _ => ( )
229
- }
223
+ if let hir:: StmtSemi ( ref expr, _) = s. node {
224
+ if let hir:: ExprPath ( ..) = expr. node {
225
+ cx. span_lint ( PATH_STATEMENTS , s. span ,
226
+ "path statement with no effect" ) ;
230
227
}
231
- _ => ( )
232
228
}
233
229
}
234
230
}
You can’t perform that action at this time.
0 commit comments