File tree Expand file tree Collapse file tree 2 files changed +10
-19
lines changed
branches/try/src/librustc_lint Expand file tree Collapse file tree 2 files changed +10
-19
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 38e97b99a6b133cb4c621c68e75b28abc6c617c1
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5
- refs/heads/try: 8a7b6b3ee6a85aa60a1733727a4028a690744fdf
5
+ refs/heads/try: fe2e0976decadb94cecc4ab85abdd02345cc7a64
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
8
8
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
Original file line number Diff line number Diff line change @@ -1218,26 +1218,17 @@ impl LintPass for UnusedImportBraces {
1218
1218
}
1219
1219
1220
1220
fn check_item ( & mut self , cx : & Context , item : & ast:: Item ) {
1221
- match item. node {
1222
- ast:: ItemUse ( ref view_path) => {
1223
- match view_path. node {
1224
- ast:: ViewPathList ( _, ref items) => {
1225
- if items. len ( ) == 1 {
1226
- match items[ 0 ] . node {
1227
- ast:: PathListIdent { ref name, ..} => {
1228
- let m = format ! ( "braces around {} is unnecessary" ,
1229
- & token:: get_ident( * name) ) ;
1230
- cx. span_lint ( UNUSED_IMPORT_BRACES , item. span ,
1231
- & m[ ..] ) ;
1232
- } ,
1233
- _ => ( )
1234
- }
1235
- }
1221
+ if let ast:: ItemUse ( ref view_path) = item. node {
1222
+ if let ast:: ViewPathList ( _, ref items) = view_path. node {
1223
+ if items. len ( ) == 1 {
1224
+ if let ast:: PathListIdent { ref name, ..} = items[ 0 ] . node {
1225
+ let m = format ! ( "braces around {} is unnecessary" ,
1226
+ & token:: get_ident( * name) ) ;
1227
+ cx. span_lint ( UNUSED_IMPORT_BRACES , item. span ,
1228
+ & m[ ..] ) ;
1236
1229
}
1237
- _ => ( )
1238
1230
}
1239
- } ,
1240
- _ => ( )
1231
+ }
1241
1232
}
1242
1233
}
1243
1234
}
You can’t perform that action at this time.
0 commit comments