Skip to content

Commit

Permalink
Use is_some_and helper
Browse files Browse the repository at this point in the history
Co-authored-by: Guillaume Gomez <[email protected]>
  • Loading branch information
notriddle and GuillaumeGomez authored Jan 2, 2025
1 parent c7cb822 commit 8af769d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustdoc/passes/propagate_stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 8af769d

Please sign in to comment.