]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/repeat_once.rs
Better handle method/function calls
[rust.git] / clippy_lints / src / repeat_once.rs
index b5dd2de633742813a9b72347cf1fbc2e09724a44..898c70ace66f35776c42c3b6a866022af81c7751 100644 (file)
@@ -46,7 +46,7 @@
 impl<'tcx> LateLintPass<'tcx> for RepeatOnce {
     fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'tcx Expr<'_>) {
         if_chain! {
-            if let ExprKind::MethodCall(path, _, [receiver, count], _) = &expr.kind;
+            if let ExprKind::MethodCall(path, [receiver, count], _) = &expr.kind;
             if path.ident.name == sym!(repeat);
             if constant_context(cx, cx.typeck_results()).expr(count) == Some(Constant::Int(1));
             if !receiver.span.from_expansion();