diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-01-20 10:47:13 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2025-01-20 10:48:34 +0100 |
| commit | eff57e29a9fa79985350fe89e86bd74f0d065a62 (patch) | |
| tree | 7a7d32cc7264dee40bcd80cf9c5a7df058be4826 | |
| parent | 2280b8a09967891b6c3d2d53a001c514954489c3 (diff) | |
| download | rust-eff57e29a9fa79985350fe89e86bd74f0d065a62.tar.gz rust-eff57e29a9fa79985350fe89e86bd74f0d065a62.zip | |
Fix out-of-date comment
This comment was left behind when the method receiver was split out from the method arguments in 4bcaddeeb23544eb2c86b600c3d775e2773758c2.
| -rw-r--r-- | clippy_lints/src/methods/unnecessary_sort_by.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/unnecessary_sort_by.rs b/clippy_lints/src/methods/unnecessary_sort_by.rs index 2732a89e07b..ebc08503dec 100644 --- a/clippy_lints/src/methods/unnecessary_sort_by.rs +++ b/clippy_lints/src/methods/unnecessary_sort_by.rs @@ -44,8 +44,7 @@ fn mirrored_exprs(a_expr: &Expr<'_>, a_ident: &Ident, b_expr: &Expr<'_>, b_ident && iter::zip(*left_args, *right_args).all(|(left, right)| mirrored_exprs(left, a_ident, right, b_ident)) }, // The two exprs are method calls. - // Check to see that the function is the same and the arguments are mirrored - // This is enough because the receiver of the method is listed in the arguments + // Check to see that the function is the same and the arguments and receivers are mirrored ( ExprKind::MethodCall(left_segment, left_receiver, left_args, _), ExprKind::MethodCall(right_segment, right_receiver, right_args, _), |
