diff options
author | Joe Wilm <jwilm@users.noreply.github.com> | 2018-12-10 09:53:56 -0800 |
---|---|---|
committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-12-10 17:53:56 +0000 |
commit | 217ad9ec285b4923de1790b0976c8c793039c994 (patch) | |
tree | 440e0d6d35f119246d2b113fd01b431f4f9c2c38 /font/src/ft | |
parent | 7ab0b448479c9705fa14003bda97040630710b7a (diff) | |
download | alacritty-217ad9ec285b4923de1790b0976c8c793039c994.tar.gz alacritty-217ad9ec285b4923de1790b0976c8c793039c994.zip |
Upgrade to Rust 2018
This resolves a lot of NLL issues, however full NLL will be necessary to
handle a couple of remaining issues.
Diffstat (limited to 'font/src/ft')
-rw-r--r-- | font/src/ft/mod.rs | 4 |
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 |