@@ -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