Skip to content

Commit 8af769d

Browse files
Use is_some_and helper
Co-authored-by: Guillaume Gomez <[email protected]>
1 parent c7cb822 commit 8af769d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustdoc/passes/propagate_stability.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ fn merge_stability(
110110
} else if let Some(mut own_stab) = own_stability
111111
&& let StabilityLevel::Stable { since, allowed_through_unstable_modules: true } =
112112
own_stab.level
113-
&& let Some(parent_stab) = parent_stability
114-
&& parent_stab.is_stable()
113+
&& parent_stability.is_some_and(|stab| stab.is_stable())
115114
{
116115
// this property does not apply transitively through re-exports
117116
own_stab.level = StabilityLevel::Stable { since, allowed_through_unstable_modules: false };

0 commit comments

Comments
 (0)