diff options
Diffstat (limited to 'font/src/ft')
-rw-r--r-- | font/src/ft/fc/pattern.rs | 2 | ||||
-rw-r--r-- | font/src/ft/mod.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/font/src/ft/fc/pattern.rs b/font/src/ft/fc/pattern.rs index 7d8d6430..4fcea7ae 100644 --- a/font/src/ft/fc/pattern.rs +++ b/font/src/ft/fc/pattern.rs @@ -518,7 +518,7 @@ impl PatternRef { } pub fn get_width(&self) -> Option<Width> { - unsafe { self.get_integer(b"width\0").nth(0).map(Width::from) } + unsafe { self.get_integer(b"width\0").next().map(Width::from) } } pub fn rgba(&self) -> RgbaPropertyIter { diff --git a/font/src/ft/mod.rs b/font/src/ft/mod.rs index d92ab7c4..5c5c4a73 100644 --- a/font/src/ft/mod.rs +++ b/font/src/ft/mod.rs @@ -251,7 +251,7 @@ impl FreeTypeRasterizer { } fn face_from_pattern(&mut self, pattern: &fc::Pattern) -> Result<Option<FontKey>, Error> { - if let (Some(path), Some(index)) = (pattern.file(0), pattern.index().nth(0)) { + if let (Some(path), Some(index)) = (pattern.file(0), pattern.index().next()) { if let Some(key) = self.keys.get(&path) { return Ok(Some(*key)); } @@ -547,7 +547,7 @@ impl FreeTypeRasterizer { let config = fc::Config::get_current(); match fc::font_match(config, &mut pattern) { Some(pattern) => { - if let (Some(path), Some(_)) = (pattern.file(0), pattern.index().nth(0)) { + if let (Some(path), Some(_)) = (pattern.file(0), pattern.index().next()) { match self.keys.get(&path) { // We've previously loaded this font, so don't // load it again. |