Use is_some_and helper

Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
This commit is contained in:
Michael Howell 2025-01-02 14:08:43 -07:00 committed by GitHub
parent c7cb8224e2
commit 8af769d1b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 };