summaryrefslogtreecommitdiff
path: root/crates/typst-pdf/src/outline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-pdf/src/outline.rs')
-rw-r--r--crates/typst-pdf/src/outline.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-pdf/src/outline.rs b/crates/typst-pdf/src/outline.rs
index ff72eb86..eff1182c 100644
--- a/crates/typst-pdf/src/outline.rs
+++ b/crates/typst-pdf/src/outline.rs
@@ -70,7 +70,7 @@ pub(crate) fn write_outline(
// (not exceeding whichever is the most restrictive depth limit
// of those two).
while children.last().is_some_and(|last| {
- last_skipped_level.map_or(true, |l| last.level < l)
+ last_skipped_level.is_none_or(|l| last.level < l)
&& last.level < leaf.level
}) {
children = &mut children.last_mut().unwrap().children;
@@ -83,7 +83,7 @@ pub(crate) fn write_outline(
// needed, following the usual rules listed above.
last_skipped_level = None;
children.push(leaf);
- } else if last_skipped_level.map_or(true, |l| leaf.level < l) {
+ } else if last_skipped_level.is_none_or(|l| leaf.level < l) {
// Only the topmost / lowest-level skipped heading matters when you
// have consecutive skipped headings (since none of them are being
// added to the bookmark tree), hence the condition above.