]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/len_zero.rs
Auto merge of #9873 - smoelius:move-line-span, r=flip1995
[rust.git] / clippy_lints / src / len_zero.rs
index 3a563736fb077b7ae51d3016ff63c9c0c4434182..76b0c21327c870a296583c12e18d33bc294ce021 100644 (file)
@@ -366,8 +366,7 @@ fn check_for_is_empty<'tcx>(
 }
 
 fn check_cmp(cx: &LateContext<'_>, span: Span, method: &Expr<'_>, lit: &Expr<'_>, op: &str, compare_to: u32) {
-    if let (&ExprKind::MethodCall(method_path, receiver, args, _), &ExprKind::Lit(ref lit)) = (&method.kind, &lit.kind)
-    {
+    if let (&ExprKind::MethodCall(method_path, receiver, args, _), ExprKind::Lit(lit)) = (&method.kind, &lit.kind) {
         // check if we are in an is_empty() method
         if let Some(name) = get_item_name(cx, method) {
             if name.as_str() == "is_empty" {