@@ -2319,7 +2319,7 @@ fn check_methods<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, msrv: Optio
2319
2319
( "is_file" , [ ] ) => filetype_is_file:: check ( cx, expr, recv) ,
2320
2320
( "is_none" , [ ] ) => check_is_some_is_none ( cx, expr, recv, false ) ,
2321
2321
( "is_some" , [ ] ) => check_is_some_is_none ( cx, expr, recv, true ) ,
2322
- ( "last" , args @ [ ] ) => {
2322
+ ( "last" | "skip" , args @ [ ] ) => {
2323
2323
if let Some ( ( name2, [ recv2, args2 @ ..] , _span2) ) = method_call ( recv) {
2324
2324
if let ( "cloned" , [ ] ) = ( name2, args2) {
2325
2325
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
2367
2367
unnecessary_lazy_eval:: check ( cx, expr, recv, arg, "or" ) ;
2368
2368
}
2369
2369
} ,
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
- } ,
2377
2370
( "splitn" | "rsplitn" , [ count_arg, pat_arg] ) => {
2378
2371
if let Some ( ( Constant :: Int ( count) , _) ) = constant ( cx, cx. typeck_results ( ) , count_arg) {
2379
2372
suspicious_splitn:: check ( cx, name, expr, recv, count) ;
0 commit comments