summaryrefslogtreecommitdiff
path: root/crates/typst-pdf
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-02-28 15:24:50 +0100
committerGitHub <noreply@github.com>2024-02-28 14:24:50 +0000
commit8d63b0479c8b74a756a9e9b34d97f821f280fd22 (patch)
tree30cc34e366948d9ea461a1ad35f80bb5c89e10ab /crates/typst-pdf
parent9d8df00ffb587f1e6062ae471d3da3b1ac61ba9e (diff)
Make use of `is_some_and` where applicable (#3523)
Diffstat (limited to 'crates/typst-pdf')
-rw-r--r--crates/typst-pdf/src/outline.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/typst-pdf/src/outline.rs b/crates/typst-pdf/src/outline.rs
index adb0df2f..a060c175 100644
--- a/crates/typst-pdf/src/outline.rs
+++ b/crates/typst-pdf/src/outline.rs
@@ -55,7 +55,7 @@ pub(crate) fn write_outline(ctx: &mut PdfContext) -> Option<Ref> {
// exists), or at most as deep as its actual nesting level in Typst
// (not exceeding whichever is the most restrictive depth limit
// of those two).
- while children.last().map_or(false, |last| {
+ while children.last().is_some_and(|last| {
last_skipped_level.map_or(true, |l| last.level < l)
&& last.level < leaf.level
}) {