diff --git a/src/base.rs b/src/base.rs index 9cfb0a9..5b8e71c 100644 --- a/src/base.rs +++ b/src/base.rs @@ -28,7 +28,9 @@ pub type CGFloat = libc::c_float; pub type CGError = libc::int32_t; -pub type CGAffineTransform = (); +// This is an enum due to zero-sized types warnings. +// For more details see https://github.com/rust-lang/rust/issues/27303 +pub enum CGAffineTransform {} pub const kCGImageAlphaNone: u32 = 0; pub const kCGImageAlphaPremultipliedLast: u32 = 1; diff --git a/src/context.rs b/src/context.rs index 3347bf5..d6c44d3 100644 --- a/src/context.rs +++ b/src/context.rs @@ -28,8 +28,9 @@ pub enum CGTextDrawingMode { CGTextClip } -#[repr(C)] -pub struct __CGContext; +// This is an enum due to zero-sized types warnings. +// For more details see https://github.com/rust-lang/rust/issues/27303 +pub enum __CGContext {} pub type CGContextRef = *const __CGContext; diff --git a/src/font.rs b/src/font.rs index 3c1c390..00d3b89 100644 --- a/src/font.rs +++ b/src/font.rs @@ -17,8 +17,9 @@ use std::ptr; pub type CGGlyph = libc::c_ushort; -#[repr(C)] -pub struct __CGFont; +// This is an enum due to zero-sized types warnings. +// For more details see https://github.com/rust-lang/rust/issues/27303 +pub enum __CGFont {} pub type CGFontRef = *const __CGFont;