summaryrefslogtreecommitdiff
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, 2 insertions, 2 deletions
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.