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/char_set.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/char_set.rs')
-rw-r--r-- | font/src/ft/fc/char_set.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/font/src/ft/fc/char_set.rs b/font/src/ft/fc/char_set.rs index 310fa189..9d71fea4 100644 --- a/font/src/ft/fc/char_set.rs +++ b/font/src/ft/fc/char_set.rs @@ -11,16 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +use std::ptr::NonNull; + use foreign_types::ForeignTypeRef; use super::ffi::FcCharSetCreate; use super::ffi::{FcCharSet, FcCharSetAddChar, FcCharSetDestroy}; foreign_type! { - type CType = FcCharSet; - fn drop = FcCharSetDestroy; - pub struct CharSet; - pub struct CharSetRef; + pub type CharSet { + type CType = FcCharSet; + fn drop = FcCharSetDestroy; + } } impl CharSet { @@ -31,7 +33,7 @@ impl CharSet { impl Default for CharSet { fn default() -> Self { - CharSet(unsafe { FcCharSetCreate() }) + CharSet(unsafe { NonNull::new(FcCharSetCreate()).unwrap() }) } } |