aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarlan Lieberman-Berg <hlieberman@setec.io>2017-02-27 21:49:58 -0500
committerJoe Wilm <jwilm@users.noreply.github.com>2017-03-01 22:07:14 -0800
commitd5342a78cdec733451af7970fb6f2ae3106b1884 (patch)
treef2cf525eb983810124895218b4f855c7dc553657
parent6ed7d99453c03dc5c739018cd0c7b880cf55ea75 (diff)
downloadalacritty-d5342a78cdec733451af7970fb6f2ae3106b1884.tar.gz
alacritty-d5342a78cdec733451af7970fb6f2ae3106b1884.zip
Drop unnecessary unsafe on add_charset
-rw-r--r--font/src/ft/list_fonts.rs2
-rw-r--r--font/src/ft/mod.rs4
2 files changed, 2 insertions, 4 deletions
diff --git a/font/src/ft/list_fonts.rs b/font/src/ft/list_fonts.rs
index fdadea82..5fa40ac8 100644
--- a/font/src/ft/list_fonts.rs
+++ b/font/src/ft/list_fonts.rs
@@ -380,7 +380,7 @@ pub mod fc {
/// FcValueSave so that no references to application provided memory are
/// retained. That is, the CharSet can be safely dropped immediately
/// after being added to the pattern.
- pub unsafe fn add_charset(&self, charset: &CharSetRef) -> bool {
+ pub fn add_charset(&self, charset: &CharSetRef) -> bool {
unsafe {
FcPatternAddCharSet(
self.as_ptr(),
diff --git a/font/src/ft/mod.rs b/font/src/ft/mod.rs
index d6585265..b751cdcf 100644
--- a/font/src/ft/mod.rs
+++ b/font/src/ft/mod.rs
@@ -229,9 +229,7 @@ impl FreeTypeRasterizer {
let mut charset = fc::CharSet::new();
charset.add(glyph);
let mut pattern = fc::Pattern::new();
- unsafe {
- pattern.add_charset(&charset);
- }
+ pattern.add_charset(&charset);
let config = fc::Config::get_current();
match fc::font_match(config, &mut pattern) {