From 8af769d1b13faf4863b1ed06e800dd8faa2d75e4 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 2 Jan 2025 14:08:43 -0700 Subject: [PATCH] Use `is_some_and` helper Co-authored-by: Guillaume Gomez --- src/librustdoc/passes/propagate_stability.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustdoc/passes/propagate_stability.rs b/src/librustdoc/passes/propagate_stability.rs index 9e06102bef6d..d892c5858377 100644 --- a/src/librustdoc/passes/propagate_stability.rs +++ b/src/librustdoc/passes/propagate_stability.rs @@ -110,8 +110,7 @@ fn merge_stability( } else if let Some(mut own_stab) = own_stability && let StabilityLevel::Stable { since, allowed_through_unstable_modules: true } = own_stab.level - && let Some(parent_stab) = parent_stability - && parent_stab.is_stable() + && parent_stability.is_some_and(|stab| stab.is_stable()) { // this property does not apply transitively through re-exports own_stab.level = StabilityLevel::Stable { since, allowed_through_unstable_modules: false };