@@ -57,7 +57,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedIoAmount {
57
57
check_map_error ( cx, res, expr) ;
58
58
}
59
59
} ,
60
- hir:: ExprKind :: MethodCall ( path, _, [ ref arg_0, ..] , _) => match & * path. ident . as_str ( ) {
60
+ hir:: ExprKind :: MethodCall ( path, _, [ ref arg_0, ..] , _) => match path. ident . as_str ( ) {
61
61
"expect" | "unwrap" | "unwrap_or" | "unwrap_or_else" => {
62
62
check_map_error ( cx, arg_0, expr) ;
63
63
} ,
@@ -71,7 +71,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedIoAmount {
71
71
fn check_map_error ( cx : & LateContext < ' _ > , call : & hir:: Expr < ' _ > , expr : & hir:: Expr < ' _ > ) {
72
72
let mut call = call;
73
73
while let hir:: ExprKind :: MethodCall ( path, _, args, _) = call. kind {
74
- if matches ! ( & * path. ident. as_str( ) , "or" | "or_else" | "ok" ) {
74
+ if matches ! ( path. ident. as_str( ) , "or" | "or_else" | "ok" ) {
75
75
call = & args[ 0 ] ;
76
76
} else {
77
77
break ;
@@ -82,7 +82,7 @@ fn check_map_error(cx: &LateContext<'_>, call: &hir::Expr<'_>, expr: &hir::Expr<
82
82
83
83
fn check_method_call ( cx : & LateContext < ' _ > , call : & hir:: Expr < ' _ > , expr : & hir:: Expr < ' _ > ) {
84
84
if let hir:: ExprKind :: MethodCall ( path, _, _, _) = call. kind {
85
- let symbol = & * path. ident . as_str ( ) ;
85
+ let symbol = path. ident . as_str ( ) ;
86
86
let read_trait = match_trait_method ( cx, call, & paths:: IO_READ ) ;
87
87
let write_trait = match_trait_method ( cx, call, & paths:: IO_WRITE ) ;
88
88
0 commit comments