From 8f5aaf16a29636c383dc5287f521c4fc7ae41167 Mon Sep 17 00:00:00 2001 From: mkorje Date: Tue, 10 Jun 2025 20:55:35 +1000 Subject: [PATCH] Cleaner option chain --- crates/typst-layout/src/math/fragment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/typst-layout/src/math/fragment.rs b/crates/typst-layout/src/math/fragment.rs index 2d3d5dc22..d35de18eb 100644 --- a/crates/typst-layout/src/math/fragment.rs +++ b/crates/typst-layout/src/math/fragment.rs @@ -681,8 +681,8 @@ fn glyph_construction(font: &Font, id: GlyphId, axis: Axis) -> Option variants.horizontal_constructions, Axis::Y => variants.vertical_constructions, - }) - .and_then(|constructions| constructions.get(id)) + })? + .get(id) } /// Assemble a glyph from parts.