Move CGDataProvider static methods outside of trait/impl.
This commit is contained in:
+1
-8
@@ -30,12 +30,7 @@ pub impl CGDataProviderRef : AbstractCFTypeRef {
|
||||
|
||||
pub type CGDataProvider = CFWrapper<CGDataProviderRef, (), ()>;
|
||||
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user