mirror of
https://github.com/typst/typst
synced 2025-08-24 19:54:14 +08:00
Cleaner option chain
This commit is contained in:
parent
cfe1806bdb
commit
8f5aaf16a2
@ -681,8 +681,8 @@ fn glyph_construction(font: &Font, id: GlyphId, axis: Axis) -> Option<GlyphConst
|
||||
.map(|variants| match axis {
|
||||
Axis::X => variants.horizontal_constructions,
|
||||
Axis::Y => variants.vertical_constructions,
|
||||
})
|
||||
.and_then(|constructions| constructions.get(id))
|
||||
})?
|
||||
.get(id)
|
||||
}
|
||||
|
||||
/// Assemble a glyph from parts.
|
||||
|
Loading…
x
Reference in New Issue
Block a user