diff --git a/core-foundation-sys/src/attributed_string.rs b/core-foundation-sys/src/attributed_string.rs index ecdffe6..c91bf5b 100644 --- a/core-foundation-sys/src/attributed_string.rs +++ b/core-foundation-sys/src/attributed_string.rs @@ -52,5 +52,4 @@ extern { value: CFTypeRef, ); - pub fn CFMutableAttributedStringGetTypeID() -> CFTypeID; } diff --git a/core-foundation/src/attributed_string.rs b/core-foundation/src/attributed_string.rs index e0fa576..c99775d 100644 --- a/core-foundation/src/attributed_string.rs +++ b/core-foundation/src/attributed_string.rs @@ -41,7 +41,7 @@ impl CFAttributedString { declare_TCFType!{ CFMutableAttributedString, CFMutableAttributedStringRef } -impl_TCFType!(CFMutableAttributedString, CFMutableAttributedStringRef, CFMutableAttributedStringGetTypeID); +impl_TCFType!(CFMutableAttributedString, CFMutableAttributedStringRef, CFAttributedStringGetTypeID); impl CFMutableAttributedString { #[inline] @@ -83,3 +83,16 @@ impl Default for CFMutableAttributedString { Self::new() } } + + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn attributed_string_type_id_comparison() { + // CFMutableAttributedString TypeID must be equal to CFAttributedString TypeID. + // Compilation must not fail. + assert_eq!(::type_id(), ::type_id()); + } +} \ No newline at end of file