about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAda Alakbarova <ada.alakbarova@proton.me>2025-08-20 00:53:25 +0200
committerAda Alakbarova <ada.alakbarova@proton.me>2025-08-20 20:43:27 +0200
commit5ec13c9428a0288c8a6c322ee20e02505bab1e22 (patch)
tree7c45f2d97d98511e934eccf28810a97a1196793b
parent9a2076ed87b8a220e246c34d7d7a2cbc4d0bf282 (diff)
merge pats
-rw-r--r--clippy_lints/src/len_zero.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs
index 6beddc1be14..14fcc0fe6ff 100644
--- a/clippy_lints/src/len_zero.rs
+++ b/clippy_lints/src/len_zero.rs
@@ -349,7 +349,7 @@ fn is_first_generic_integral<'tcx>(segment: &'tcx PathSegment<'tcx>) -> bool {
             let segments = &path.segments;
             let segment = &segments[0];
             let res = &segment.res;
-            if matches!(res, Res::PrimTy(PrimTy::Uint(_))) || matches!(res, Res::PrimTy(PrimTy::Int(_))) {
+            if matches!(res, Res::PrimTy(PrimTy::Uint(_) | PrimTy::Int(_))) {
                 return true;
             }
         }
@@ -362,7 +362,7 @@ fn parse_len_output<'tcx>(cx: &LateContext<'tcx>, sig: FnSig<'tcx>) -> Option<Le
     if let Some(segment) = extract_future_output(cx, sig.output()) {
         let res = segment.res;
 
-        if matches!(res, Res::PrimTy(PrimTy::Uint(_))) || matches!(res, Res::PrimTy(PrimTy::Int(_))) {
+        if matches!(res, Res::PrimTy(PrimTy::Uint(_) | PrimTy::Int(_))) {
             return Some(LenOutput::Integral);
         }