@@ -95,7 +95,7 @@ fn mirrored_exprs(
95
95
// The two exprs are method calls.
96
96
// Check to see that the function is the same and the arguments are mirrored
97
97
// This is enough because the receiver of the method is listed in the arguments
98
- ( ExprKind :: MethodCall ( left_segment, _, left_args) , ExprKind :: MethodCall ( right_segment, _, right_args) ) => {
98
+ ( ExprKind :: MethodCall ( left_segment, _, left_args, _ ) , ExprKind :: MethodCall ( right_segment, _, right_args, _ ) ) => {
99
99
left_segment. ident == right_segment. ident
100
100
&& left_args
101
101
. iter ( )
@@ -170,7 +170,7 @@ fn mirrored_exprs(
170
170
171
171
fn detect_lint ( cx : & LateContext < ' _ , ' _ > , expr : & Expr < ' _ > ) -> Option < LintTrigger > {
172
172
if_chain ! {
173
- if let ExprKind :: MethodCall ( name_ident, _, args) = & expr. kind;
173
+ if let ExprKind :: MethodCall ( name_ident, _, args, _ ) = & expr. kind;
174
174
if let name = name_ident. ident. name. to_ident_string( ) ;
175
175
if name == "sort_by" || name == "sort_unstable_by" ;
176
176
if let [ vec, Expr { kind: ExprKind :: Closure ( _, _, closure_body_id, _, _) , .. } ] = args;
@@ -180,7 +180,7 @@ fn detect_lint(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> Option<LintTrigger>
180
180
Param { pat: Pat { kind: PatKind :: Binding ( _, _, left_ident, _) , .. } , ..} ,
181
181
Param { pat: Pat { kind: PatKind :: Binding ( _, _, right_ident, _) , .. } , .. }
182
182
] = & closure_body. params;
183
- if let ExprKind :: MethodCall ( method_path, _, [ ref left_expr, ref right_expr] ) = & closure_body. value. kind;
183
+ if let ExprKind :: MethodCall ( method_path, _, [ ref left_expr, ref right_expr] , _ ) = & closure_body. value. kind;
184
184
if method_path. ident. name. to_ident_string( ) == "cmp" ;
185
185
then {
186
186
let ( closure_body, closure_arg, reverse) = if mirrored_exprs(
0 commit comments