summaryrefslogtreecommitdiff
path: root/crates/typst-pdf/src/outline.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2025-02-24 13:28:01 +0100
committerGitHub <noreply@github.com>2025-02-24 12:28:01 +0000
commit69c3f957051358eff961addbcae4ff02448513dc (patch)
tree4108c418417313d084318ffecf59cab56de32cb9 /crates/typst-pdf/src/outline.rs
parentebe25432641a729780578a2440eaf9fb07c80e38 (diff)
Bump MSRV to 1.83 and Rust in CI to 1.85 (#5946)
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.