Drop unnecessary unsafe on add_charset
This commit is contained in:
parent
6ed7d99453
commit
d5342a78cd
|
@ -380,7 +380,7 @@ pub mod fc {
|
||||||
/// FcValueSave so that no references to application provided memory are
|
/// FcValueSave so that no references to application provided memory are
|
||||||
/// retained. That is, the CharSet can be safely dropped immediately
|
/// retained. That is, the CharSet can be safely dropped immediately
|
||||||
/// after being added to the pattern.
|
/// after being added to the pattern.
|
||||||
pub unsafe fn add_charset(&self, charset: &CharSetRef) -> bool {
|
pub fn add_charset(&self, charset: &CharSetRef) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
FcPatternAddCharSet(
|
FcPatternAddCharSet(
|
||||||
self.as_ptr(),
|
self.as_ptr(),
|
||||||
|
|
|
@ -229,9 +229,7 @@ impl FreeTypeRasterizer {
|
||||||
let mut charset = fc::CharSet::new();
|
let mut charset = fc::CharSet::new();
|
||||||
charset.add(glyph);
|
charset.add(glyph);
|
||||||
let mut pattern = fc::Pattern::new();
|
let mut pattern = fc::Pattern::new();
|
||||||
unsafe {
|
pattern.add_charset(&charset);
|
||||||
pattern.add_charset(&charset);
|
|
||||||
}
|
|
||||||
|
|
||||||
let config = fc::Config::get_current();
|
let config = fc::Config::get_current();
|
||||||
match fc::font_match(config, &mut pattern) {
|
match fc::font_match(config, &mut pattern) {
|
||||||
|
|
Loading…
Reference in New Issue