diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-06-08 16:01:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-08 16:01:14 +0000 |
commit | 4cd55acd7820a7358f9175c106c91e0945fb15b2 (patch) | |
tree | 9e4e8383e73406524ccb2d28e666e9c2a77bbbd0 /font/src/ft/fc/pattern.rs | |
parent | 527dc8f564823d3dd01f79f22614271c7f3bc518 (diff) | |
download | alacritty-4cd55acd7820a7358f9175c106c91e0945fb15b2.tar.gz alacritty-4cd55acd7820a7358f9175c106c91e0945fb15b2.zip |
Bump minimum supported Rust version to 1.32.0
Diffstat (limited to 'font/src/ft/fc/pattern.rs')
-rw-r--r-- | font/src/ft/fc/pattern.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/font/src/ft/fc/pattern.rs b/font/src/ft/fc/pattern.rs index 84187aa3..b6eceed8 100644 --- a/font/src/ft/fc/pattern.rs +++ b/font/src/ft/fc/pattern.rs @@ -15,7 +15,7 @@ use std::ffi::{CStr, CString}; use std::fmt; use std::mem; use std::path::PathBuf; -use std::ptr; +use std::ptr::{self, NonNull}; use std::str; use foreign_types::{ForeignType, ForeignTypeRef}; @@ -326,10 +326,10 @@ impl_derived_property_iter! { } foreign_type! { - type CType = FcPattern; - fn drop = FcPatternDestroy; - pub struct Pattern; - pub struct PatternRef; + pub type Pattern { + type CType = FcPattern; + fn drop = FcPatternDestroy; + } } macro_rules! string_accessor { @@ -360,7 +360,7 @@ impl Pattern { impl Default for Pattern { fn default() -> Self { - Pattern(unsafe { FcPatternCreate() }) + Pattern(unsafe { NonNull::new(FcPatternCreate()).unwrap() }) } } |