diff options
| author | Michael Howell <michael@notriddle.com> | 2025-01-02 14:08:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-02 14:08:43 -0700 |
| commit | 8af769d1b13faf4863b1ed06e800dd8faa2d75e4 (patch) | |
| tree | a5836eb1e044bbac2b37b08a4db58c412f6e2e0f | |
| parent | c7cb8224e2020d30df6bceb8ea2e16e7a2594585 (diff) | |
| download | rust-8af769d1b13faf4863b1ed06e800dd8faa2d75e4.tar.gz rust-8af769d1b13faf4863b1ed06e800dd8faa2d75e4.zip | |
Use `is_some_and` helper
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
| -rw-r--r-- | src/librustdoc/passes/propagate_stability.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustdoc/passes/propagate_stability.rs b/src/librustdoc/passes/propagate_stability.rs index 9e06102bef6..d892c585837 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 }; |
