From 255ddca46619a6f2bc7c50e1da37096752a07545 Mon Sep 17 00:00:00 2001 From: "Brian J. Burg" Date: Fri, 16 Nov 2012 11:20:13 -0800 Subject: [PATCH] Move CGDataProvider static methods outside of trait/impl. --- data_provider.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/data_provider.rs b/data_provider.rs index 9013020..529c67f 100644 --- a/data_provider.rs +++ b/data_provider.rs @@ -30,12 +30,7 @@ pub impl CGDataProviderRef : AbstractCFTypeRef { pub type CGDataProvider = CFWrapper; -pub trait CGDataProviderMethods { - static fn new_from_buffer(buf: *u8, len: uint) -> CGDataProvider; -} - -pub impl CGDataProvider : CGDataProviderMethods { - static fn new_from_buffer(buf: *u8, len: uint) -> CGDataProvider unsafe { +pub fn new_from_buffer(buf: *u8, len: uint) -> CGDataProvider unsafe { let result = CGDataProviderCreateWithData( ptr::null(), cast::transmute(buf), @@ -43,10 +38,8 @@ pub impl CGDataProvider : CGDataProviderMethods { ptr::null()); CFWrapper::wrap_owned(result) - } } - #[nolink] #[link_args="-framework ApplicationServices"] pub extern {