Skip to content

Commit 777b467

Browse files
Update to 2018 edition. (#208)
1 parent 1d7bdc0 commit 777b467

File tree

11 files changed

+15
-31
lines changed

11 files changed

+15
-31
lines changed

harfbuzz-sys/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "harfbuzz-sys"
33
version = "0.5.0"
4+
edition = "2018"
45

56
authors = ["The Servo Project Developers"]
67
license = "MIT"

harfbuzz-sys/build.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#[cfg(feature = "build-native-harfbuzz")]
2-
extern crate cc;
3-
#[cfg(feature = "build-native-harfbuzz")]
4-
extern crate pkg_config;
5-
61
#[cfg(feature = "build-native-harfbuzz")]
72
fn main() {
83
use std::env;

harfbuzz-sys/src/coretext.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
extern crate core_graphics;
2-
extern crate core_text;
3-
extern crate foreign_types;
1+
use crate::{hb_face_t, hb_font_t};
42

5-
use {hb_face_t, hb_font_t};
6-
7-
use self::core_graphics::font::CGFont;
8-
use self::core_text::font::CTFontRef;
9-
use self::foreign_types::ForeignType;
3+
use core_graphics::font::CGFont;
4+
use core_text::font::CTFontRef;
5+
use foreign_types::ForeignType;
106

117
type CGFontRef = *mut <CGFont as ForeignType>::CType;
128

harfbuzz-sys/src/directwrite.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
extern crate winapi;
1+
use crate::hb_face_t;
22

3-
use hb_face_t;
4-
5-
use self::winapi::um::dwrite::IDWriteFontFace;
3+
use winapi::um::dwrite::IDWriteFontFace;
64

75
extern "C" {
86
pub fn hb_directwrite_face_create(font_face: *mut IDWriteFontFace) -> *mut hb_face_t;

harfbuzz-sys/src/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
#[cfg(any(
2-
target_os = "android",
3-
all(unix, not(target_vendor = "apple")),
4-
feature = "build-native-freetype"
5-
))]
6-
extern crate freetype;
7-
81
#[cfg(target_vendor = "apple")]
92
pub mod coretext;
103

@@ -26,4 +19,4 @@ extern "C" {
2619
#[allow(clippy::unreadable_literal)]
2720
mod bindings;
2821

29-
pub use bindings::*;
22+
pub use crate::bindings::*;

harfbuzz/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "harfbuzz"
33
version = "0.4.0"
4+
edition = "2018"
45

56
authors = ["The Servo Project Developers"]
67
license = "MIT OR Apache-2.0"

harfbuzz/src/blob.rs

Lines changed: 1 addition & 1 deletion
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 crate::sys;
1011
use std::marker::PhantomData;
1112
use std::os::raw::{c_char, c_uint, c_void};
1213
use std::sync::Arc;
1314
use std::{mem, ops, ptr, slice};
14-
use sys;
1515

1616
/// Blobs wrap a chunk of binary data to handle lifecycle management of data
1717
/// while it is passed between client and HarfBuzz.

harfbuzz/src/buffer.rs

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

10+
use crate::sys;
1011
use std;
11-
use sys;
1212

13-
use {Direction, Language};
13+
use crate::{Direction, Language};
1414

1515
/// A series of Unicode characters.
1616
///

harfbuzz/src/direction.rs

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

10-
use sys;
10+
use crate::sys;
1111

1212
/// Direction of text flow during layout.
1313
///

harfbuzz/src/language.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
#![allow(missing_docs)]
1111

12+
use crate::sys;
1213
use std;
13-
use sys;
1414

1515
#[derive(Copy, Clone, PartialEq, PartialOrd)]
1616
pub struct Language {

0 commit comments

Comments
 (0)