Skip to content

Commit 58972ae

Browse files
Update to 2018 edition. (#642)
This is the minimum fix required. It updates to use crate-relative imports.
1 parent eb41f50 commit 58972ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+485
-452
lines changed

cocoa-foundation/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repository = "https://github.com/servo/core-foundation-rs"
77
version = "0.1.2"
88
authors = ["The Servo Project Developers"]
99
license = "MIT OR Apache-2.0"
10+
edition = "2018"
1011

1112
[package.metadata.docs.rs]
1213
default-target = "x86_64-apple-darwin"

cocoa-foundation/src/foundation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#![allow(non_upper_case_globals)]
1111

12-
use base::{id, nil, BOOL, NO, SEL};
12+
use crate::base::{id, nil, BOOL, NO, SEL};
1313
use block::Block;
1414
use libc;
1515
use std::os::raw::c_void;
@@ -32,7 +32,7 @@ const UTF8_ENCODING: usize = 4;
3232

3333
#[cfg(target_os = "macos")]
3434
mod macos {
35-
use base::id;
35+
use crate::base::id;
3636
use core_graphics_types::base::CGFloat;
3737
use core_graphics_types::geometry::CGRect;
3838
use objc;

cocoa/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repository = "https://github.com/servo/core-foundation-rs"
77
version = "0.25.0"
88
authors = ["The Servo Project Developers"]
99
license = "MIT OR Apache-2.0"
10+
edition = "2018"
1011

1112
[package.metadata.docs.rs]
1213
default-target = "x86_64-apple-darwin"

cocoa/src/appkit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
#![allow(non_upper_case_globals)]
1111

12-
use base::{id, BOOL, SEL};
13-
use block::Block;
14-
use foundation::{
12+
use crate::base::{id, BOOL, SEL};
13+
use crate::foundation::{
1514
NSInteger, NSPoint, NSRange, NSRect, NSRectEdge, NSSize, NSTimeInterval, NSUInteger,
1615
};
16+
use block::Block;
1717
use libc;
1818

1919
pub use core_graphics::base::CGFloat;

cocoa/src/quartzcore.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ use foreign_types::ForeignType;
2424
use std::ops::Mul;
2525
use std::ptr;
2626

27-
use appkit::CGLContextObj;
28-
use base::{id, nil, BOOL, YES};
29-
use foundation::NSUInteger;
27+
use crate::appkit::CGLContextObj;
28+
use crate::base::{id, nil, BOOL, YES};
29+
use crate::foundation::NSUInteger;
3030

3131
// CABase.h
3232

@@ -1356,7 +1356,7 @@ pub mod transaction {
13561356
use core_foundation::date::CFTimeInterval;
13571357
use core_foundation::string::CFString;
13581358

1359-
use base::{id, BOOL, YES};
1359+
use crate::base::{id, BOOL, YES};
13601360

13611361
#[inline]
13621362
pub fn begin() {

core-foundation-sys/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ repository = "https://github.com/servo/core-foundation-rs"
66
version = "0.8.6"
77
authors = ["The Servo Project Developers"]
88
license = "MIT OR Apache-2.0"
9+
edition = "2018"
910

1011
[dependencies]
1112

core-foundation-sys/src/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFComparatorFunction, CFIndex, CFRange, CFTypeID};
13-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFComparatorFunction, CFIndex, CFRange, CFTypeID};
13+
use crate::string::CFStringRef;
1414

1515
pub type CFArrayRetainCallBack =
1616
extern "C" fn(allocator: CFAllocatorRef, value: *const c_void) -> *const c_void;

core-foundation-sys/src/attributed_string.rs

Lines changed: 4 additions & 4 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-
use base::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID, CFTypeRef};
11-
use dictionary::CFDictionaryRef;
10+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID, CFTypeRef};
11+
use crate::dictionary::CFDictionaryRef;
12+
use crate::string::CFMutableStringRef;
13+
use crate::string::CFStringRef;
1214
use std::os::raw::c_void;
13-
use string::CFMutableStringRef;
14-
use string::CFStringRef;
1515

1616
#[repr(C)]
1717
pub struct __CFAttributedString(c_void);

core-foundation-sys/src/bag.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFHashCode, CFIndex, CFTypeID};
13-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFHashCode, CFIndex, CFTypeID};
13+
use crate::string::CFStringRef;
1414

1515
#[repr(C)]
1616
pub struct __CFBag(c_void);

core-foundation-sys/src/base.rs

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

10+
use crate::string::CFStringRef;
1011
use std::cmp::Ordering;
1112
use std::os::raw::{c_int, c_short, c_uchar, c_uint, c_ushort, c_void};
12-
use string::CFStringRef;
1313

1414
pub type Boolean = u8;
1515
pub type mach_port_t = c_uint;

0 commit comments

Comments
 (0)