From e2fd92cb2388e809e2eb6daf26a8dc210b3b2ed6 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 30 Jul 2015 18:05:20 -0700 Subject: [PATCH] Add a `Clone` impl to `CTFont` --- src/font.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/font.rs b/src/font.rs index a80330c..b93c639 100644 --- a/src/font.rs +++ b/src/font.rs @@ -83,6 +83,15 @@ impl Drop for CTFont { } } +impl Clone for CTFont { + #[inline] + fn clone(&self) -> CTFont { + unsafe { + TCFType::wrap_under_get_rule(self.obj) + } + } +} + impl TCFType for CTFont { #[inline] fn as_concrete_TypeRef(&self) -> CTFontRef {