diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-02-24 13:28:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-24 12:28:01 +0000 |
| commit | 69c3f957051358eff961addbcae4ff02448513dc (patch) | |
| tree | 4108c418417313d084318ffecf59cab56de32cb9 /crates/typst-layout/src/inline/shaping.rs | |
| parent | ebe25432641a729780578a2440eaf9fb07c80e38 (diff) | |
Bump MSRV to 1.83 and Rust in CI to 1.85 (#5946)
Diffstat (limited to 'crates/typst-layout/src/inline/shaping.rs')
| -rw-r--r-- | crates/typst-layout/src/inline/shaping.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-layout/src/inline/shaping.rs b/crates/typst-layout/src/inline/shaping.rs index b688981a..159619eb 100644 --- a/crates/typst-layout/src/inline/shaping.rs +++ b/crates/typst-layout/src/inline/shaping.rs @@ -465,7 +465,7 @@ impl<'a> ShapedText<'a> { None }; let mut chain = families(self.styles) - .filter(|family| family.covers().map_or(true, |c| c.is_match("-"))) + .filter(|family| family.covers().is_none_or(|c| c.is_match("-"))) .map(|family| book.select(family.as_str(), self.variant)) .chain(fallback_func.iter().map(|f| f())) .flatten(); @@ -570,7 +570,7 @@ impl<'a> ShapedText<'a> { // for the next line. let dec = if ltr { usize::checked_sub } else { usize::checked_add }; while let Some(next) = dec(idx, 1) { - if self.glyphs.get(next).map_or(true, |g| g.range.start != text_index) { + if self.glyphs.get(next).is_none_or(|g| g.range.start != text_index) { break; } idx = next; @@ -812,7 +812,7 @@ fn shape_segment<'a>( .nth(1) .map(|(i, _)| offset + i) .unwrap_or(text.len()); - covers.map_or(true, |cov| cov.is_match(&text[offset..end])) + covers.is_none_or(|cov| cov.is_match(&text[offset..end])) }; // Collect the shaped glyphs, doing fallback and shaping parts again with |
