summaryrefslogtreecommitdiffstats
path: root/font/src/ft/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'font/src/ft/mod.rs')
-rw-r--r--font/src/ft/mod.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/font/src/ft/mod.rs b/font/src/ft/mod.rs
index c67665ab..1d3f64bd 100644
--- a/font/src/ft/mod.rs
+++ b/font/src/ft/mod.rs
@@ -270,9 +270,7 @@ impl FreeTypeRasterizer {
fn face_for_glyph(&mut self, glyph_key: GlyphKey, have_recursed: bool) -> Result<FontKey, Error> {
let c = glyph_key.c;
- let use_initial_face = if self.faces.contains_key(&glyph_key.font_key) {
- // Get face and unwrap since we just checked for presence.
- let face = &self.faces[&glyph_key.font_key];
+ let use_initial_face = if let Some(face) = self.faces.get(&glyph_key.font_key) {
let index = face.ft_face.get_char_index(c as usize);
index != 0 || have_recursed