diff options
| author | Ada Alakbarova <ada.alakbarova@proton.me> | 2025-08-20 00:53:25 +0200 |
|---|---|---|
| committer | Ada Alakbarova <ada.alakbarova@proton.me> | 2025-08-20 20:43:27 +0200 |
| commit | 5ec13c9428a0288c8a6c322ee20e02505bab1e22 (patch) | |
| tree | 7c45f2d97d98511e934eccf28810a97a1196793b | |
| parent | 9a2076ed87b8a220e246c34d7d7a2cbc4d0bf282 (diff) | |
merge pats
| -rw-r--r-- | clippy_lints/src/len_zero.rs | 4 |
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); } |
