Skip to content

Commit d48d247

Browse files
committed
Fix clippy warnings
1 parent 1c9b31d commit d48d247

File tree

1 file changed

+1
-8
lines changed
  • clippy_lints/src/methods

1 file changed

+1
-8
lines changed

Diff for: clippy_lints/src/methods/mod.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -2319,7 +2319,7 @@ fn check_methods<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, msrv: Optio
23192319
("is_file", []) => filetype_is_file::check(cx, expr, recv),
23202320
("is_none", []) => check_is_some_is_none(cx, expr, recv, false),
23212321
("is_some", []) => check_is_some_is_none(cx, expr, recv, true),
2322-
("last", args @ []) => {
2322+
("last" | "skip", args @ []) => {
23232323
if let Some((name2, [recv2, args2 @ ..], _span2)) = method_call(recv) {
23242324
if let ("cloned", []) = (name2, args2) {
23252325
iter_overeager_cloned::check(cx, expr, recv2, name, args);
@@ -2367,13 +2367,6 @@ fn check_methods<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, msrv: Optio
23672367
unnecessary_lazy_eval::check(cx, expr, recv, arg, "or");
23682368
}
23692369
},
2370-
("skip", args) => {
2371-
if let Some((name2, [recv2, args2 @ ..], _span2)) = method_call(recv) {
2372-
if let ("cloned", []) = (name2, args2) {
2373-
iter_overeager_cloned::check(cx, expr, recv2, name, args);
2374-
}
2375-
}
2376-
},
23772370
("splitn" | "rsplitn", [count_arg, pat_arg]) => {
23782371
if let Some((Constant::Int(count), _)) = constant(cx, cx.typeck_results(), count_arg) {
23792372
suspicious_splitn::check(cx, name, expr, recv, count);

0 commit comments

Comments
 (0)