aboutsummaryrefslogtreecommitdiff
path: root/font
diff options
context:
space:
mode:
Diffstat (limited to 'font')
-rw-r--r--font/src/darwin/mod.rs2
-rw-r--r--font/src/ft/fc/font_set.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs
index 2f9d5fe0..bbdb5662 100644
--- a/font/src/darwin/mod.rs
+++ b/font/src/darwin/mod.rs
@@ -68,7 +68,7 @@ impl Descriptor {
font_name: desc.font_name(),
style_name: desc.style_name(),
display_name: desc.display_name(),
- font_path: desc.font_path().unwrap_or_else(||{"".to_owned()}),
+ font_path: desc.font_path().unwrap_or_else(String::new),
ct_descriptor: desc,
}
}
diff --git a/font/src/ft/fc/font_set.rs b/font/src/ft/fc/font_set.rs
index a0c4eee0..6b63f439 100644
--- a/font/src/ft/fc/font_set.rs
+++ b/font/src/ft/fc/font_set.rs
@@ -99,7 +99,7 @@ impl<'a> Iterator for Iter<'a> {
None
} else {
let pattern = unsafe {
- let ptr = *(*self.font_set.as_ptr()).fonts.offset(self.current as isize);
+ let ptr = *(*self.font_set.as_ptr()).fonts.add(self.current);
PatternRef::from_ptr(ptr)
};