diff --git a/core-foundation/src/dictionary.rs b/core-foundation/src/dictionary.rs index ca0e277..5b3faf5 100644 --- a/core-foundation/src/dictionary.rs +++ b/core-foundation/src/dictionary.rs @@ -19,6 +19,7 @@ use std::marker::PhantomData; use base::{ItemRef, FromVoid, ToVoid}; use base::{CFIndexConvertible, TCFType}; +use ConcreteCFType; // consume the type parameters with PhantomDatas pub struct CFDictionary(CFDictionaryRef, PhantomData, PhantomData); @@ -32,6 +33,8 @@ impl Drop for CFDictionary { impl_TCFType!(CFDictionary, CFDictionaryRef, CFDictionaryGetTypeID); impl_CFTypeDescription!(CFDictionary); +unsafe impl ConcreteCFType for CFDictionary<*const c_void, *const c_void> {} + impl CFDictionary { pub fn from_CFType_pairs(pairs: &[(K, V)]) -> CFDictionary where K: TCFType, V: TCFType { let (keys, values): (Vec, Vec) = pairs