@@ -248,7 +248,7 @@ impl LateLintPass for UnusedAttributes {
248
248
249
249
let plugin_attributes = cx. sess ( ) . plugin_attributes . borrow_mut ( ) ;
250
250
for & ( ref name, ty) in plugin_attributes. iter ( ) {
251
- if ty == AttributeType :: Whitelisted && attr. check_name ( & * name) {
251
+ if ty == AttributeType :: Whitelisted && attr. check_name ( & name) {
252
252
break ;
253
253
}
254
254
}
@@ -265,7 +265,7 @@ impl LateLintPass for UnusedAttributes {
265
265
// the crate level?
266
266
let plugin_crate = plugin_attributes. iter ( )
267
267
. find ( |& & ( ref x, t) | {
268
- & * attr. name ( ) == & * x &&
268
+ & * attr. name ( ) == x &&
269
269
AttributeType :: CrateLevel == t
270
270
} ) . is_some ( ) ;
271
271
if known_crate || plugin_crate {
@@ -294,7 +294,7 @@ impl UnusedParens {
294
294
fn check_unused_parens_core ( & self , cx : & EarlyContext , value : & ast:: Expr , msg : & str ,
295
295
struct_lit_needs_parens : bool ) {
296
296
if let ast:: ExprKind :: Paren ( ref inner) = value. node {
297
- let necessary = struct_lit_needs_parens && contains_exterior_struct_lit ( & * * inner) ;
297
+ let necessary = struct_lit_needs_parens && contains_exterior_struct_lit ( & inner) ;
298
298
if !necessary {
299
299
cx. span_lint ( UNUSED_PARENS , value. span ,
300
300
& format ! ( "unnecessary parentheses around {}" , msg) )
@@ -314,8 +314,8 @@ impl UnusedParens {
314
314
ast:: ExprKind :: AssignOp ( _, ref lhs, ref rhs) |
315
315
ast:: ExprKind :: Binary ( _, ref lhs, ref rhs) => {
316
316
// X { y: 1 } + X { y: 2 }
317
- contains_exterior_struct_lit ( & * * lhs) ||
318
- contains_exterior_struct_lit ( & * * rhs)
317
+ contains_exterior_struct_lit ( & lhs) ||
318
+ contains_exterior_struct_lit ( & rhs)
319
319
}
320
320
ast:: ExprKind :: Unary ( _, ref x) |
321
321
ast:: ExprKind :: Cast ( ref x, _) |
@@ -324,12 +324,12 @@ impl UnusedParens {
324
324
ast:: ExprKind :: TupField ( ref x, _) |
325
325
ast:: ExprKind :: Index ( ref x, _) => {
326
326
// &X { y: 1 }, X { y: 1 }.y
327
- contains_exterior_struct_lit ( & * * x)
327
+ contains_exterior_struct_lit ( & x)
328
328
}
329
329
330
330
ast:: ExprKind :: MethodCall ( _, _, ref exprs) => {
331
331
// X { y: 1 }.bar(...)
332
- contains_exterior_struct_lit ( & * exprs[ 0 ] )
332
+ contains_exterior_struct_lit ( & exprs[ 0 ] )
333
333
}
334
334
335
335
_ => false
@@ -360,7 +360,7 @@ impl EarlyLintPass for UnusedParens {
360
360
InPlace ( _, ref value) => ( value, "emplacement value" , false ) ,
361
361
_ => return
362
362
} ;
363
- self . check_unused_parens_core ( cx, & * * value, msg, struct_lit_needs_parens) ;
363
+ self . check_unused_parens_core ( cx, & value, msg, struct_lit_needs_parens) ;
364
364
}
365
365
366
366
fn check_stmt ( & mut self , cx : & EarlyContext , s : & ast:: Stmt ) {
@@ -374,7 +374,7 @@ impl EarlyLintPass for UnusedParens {
374
374
} ,
375
375
_ => return
376
376
} ;
377
- self . check_unused_parens_core ( cx, & * * value, msg, false ) ;
377
+ self . check_unused_parens_core ( cx, & value, msg, false ) ;
378
378
}
379
379
}
380
380
0 commit comments