summaryrefslogtreecommitdiffstats
path: root/font/src/ft/fc/object_set.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-03 22:57:54 +0000
committerGitHub <noreply@github.com>2019-04-03 22:57:54 +0000
commite98ea64c748f1cce673c97adbc72e6a9a3c11e5f (patch)
treeaba9d97bc30eb7a78669a557b9d3ffd4a77df789 /font/src/ft/fc/object_set.rs
parent86ccd0566edf97849079889a80e67669332c37cb (diff)
Bump dependencies
Diffstat (limited to 'font/src/ft/fc/object_set.rs')
-rw-r--r--font/src/ft/fc/object_set.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/font/src/ft/fc/object_set.rs b/font/src/ft/fc/object_set.rs
index 2494b582..4ec15feb 100644
--- a/font/src/ft/fc/object_set.rs
+++ b/font/src/ft/fc/object_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 libc::c_char;
use super::ffi::{FcObjectSet, FcObjectSetAdd, FcObjectSetCreate, FcObjectSetDestroy};
use foreign_types::ForeignTypeRef;
foreign_type! {
- type CType = FcObjectSet;
- fn drop = FcObjectSetDestroy;
- pub struct ObjectSet;
- pub struct ObjectSetRef;
+ pub type ObjectSet {
+ type CType = FcObjectSet;
+ fn drop = FcObjectSetDestroy;
+ }
}
impl ObjectSet {
@@ -31,7 +33,7 @@ impl ObjectSet {
impl Default for ObjectSet {
fn default() -> Self {
- ObjectSet(unsafe { FcObjectSetCreate() })
+ ObjectSet(unsafe { NonNull::new(FcObjectSetCreate()).unwrap() })
}
}