Skip to content

Commit 449990e

Browse files
author
bors-servo
authored
Auto merge of #57 - nox:fix-all-the-things, r=Manishearth
Fix all the things <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/57) <!-- Reviewable:end -->
2 parents ea5de39 + e805130 commit 449990e

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

src/base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// this file defines CGFloat, as well as stubbed data types.
1111

1212
#![allow(non_camel_case_types)]
13+
#![allow(non_upper_case_globals)]
1314

1415
use libc;
1516

src/color_space.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
// except according to those terms.
99

1010
use core_foundation::base::{CFRelease, CFRetain, CFTypeID, CFTypeRef, TCFType};
11-
use libc::{c_void, size_t};
1211
use std::mem;
13-
use std::ptr;
1412

1513
#[repr(C)]
16-
struct __CGColorSpace;
14+
pub struct __CGColorSpace;
1715

1816
pub type CGColorSpaceRef = *const __CGColorSpace;
1917

src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use std::ptr;
1616
use std::slice;
1717

1818
#[repr(C)]
19-
struct __CGContext;
19+
pub struct __CGContext;
2020

2121
pub type CGContextRef = *const __CGContext;
2222

src/data_provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub type CGDataProviderReleaseDataCallback = *const u8;
2626
pub type CGDataProviderGetBytesAtPositionCallback = *const u8;
2727

2828
#[repr(C)]
29-
struct __CGDataProvider;
29+
pub struct __CGDataProvider;
3030

3131
pub type CGDataProviderRef = *const __CGDataProvider;
3232

src/display.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
// this file defines CGFloat, as well as stubbed data types.
10+
#![allow(non_upper_case_globals)]
11+
1112
extern crate core_foundation;
12-
// extern crate core_foundation_sys;
1313

14-
pub use libc;
14+
use libc;
1515
pub use base::{CGError, boolean_t};
1616
pub use geometry::{CGRect, CGPoint, CGSize};
1717

src/font.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::ptr;
2020
pub type CGGlyph = libc::c_ushort;
2121

2222
#[repr(C)]
23-
struct __CGFont;
23+
pub struct __CGFont;
2424

2525
pub type CGFontRef = *const __CGFont;
2626

@@ -41,7 +41,7 @@ impl Serialize for CGFont {
4141
impl Deserialize for CGFont {
4242
fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: Deserializer {
4343
let postscript_name: String = try!(Deserialize::deserialize(deserializer));
44-
CGFont::from_name(&CFString::new(&*postscript_name)).map_err(|err| {
44+
CGFont::from_name(&CFString::new(&*postscript_name)).map_err(|_| {
4545
de::Error::invalid_value("Couldn't find a font with that PostScript name!")
4646
})
4747
}

src/private.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ mod ffi {
9191
use libc::{c_int, c_uint};
9292

9393
// This is an enum so that we can't easily make instances of this opaque type.
94-
enum CGSRegionObject {}
94+
pub enum CGSRegionObject {}
9595

9696
pub type CGError = OSStatus;
9797
pub type CGSRegionRef = *mut CGSRegionObject;

0 commit comments

Comments
 (0)