Remove warnings for zero-sized structs #89.
This follows the servo pattern mentioned in https://github.com/rust-lang/rust/issues/27303 to replace the zero-sized structs with an `enum`.
This commit is contained in:
+3
-1
@@ -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;
|
||||
|
||||
+3
-2
@@ -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;
|
||||
|
||||
|
||||
+3
-2
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user