Skip to content

Commit

Permalink
Update to 2018 edition.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Aug 8, 2023
1 parent f1c0942 commit fb13a24
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 31 deletions.
1 change: 1 addition & 0 deletions harfbuzz-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "harfbuzz-sys"
version = "0.5.0"
edition = "2018"

authors = ["The Servo Project Developers"]
license = "MIT"
Expand Down
5 changes: 0 additions & 5 deletions harfbuzz-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#[cfg(feature = "build-native-harfbuzz")]
extern crate cc;
#[cfg(feature = "build-native-harfbuzz")]
extern crate pkg_config;

#[cfg(feature = "build-native-harfbuzz")]
fn main() {
use std::env;
Expand Down
12 changes: 4 additions & 8 deletions harfbuzz-sys/src/coretext.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
extern crate core_graphics;
extern crate core_text;
extern crate foreign_types;
use crate::{hb_face_t, hb_font_t};

use {hb_face_t, hb_font_t};

use self::core_graphics::font::CGFont;
use self::core_text::font::CTFontRef;
use self::foreign_types::ForeignType;
use core_graphics::font::CGFont;
use core_text::font::CTFontRef;
use foreign_types::ForeignType;

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

Expand Down
6 changes: 2 additions & 4 deletions harfbuzz-sys/src/directwrite.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
extern crate winapi;
use crate::hb_face_t;

use hb_face_t;

use self::winapi::um::dwrite::IDWriteFontFace;
use winapi::um::dwrite::IDWriteFontFace;

extern "C" {
pub fn hb_directwrite_face_create(font_face: *mut IDWriteFontFace) -> *mut hb_face_t;
Expand Down
9 changes: 1 addition & 8 deletions harfbuzz-sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#[cfg(any(
target_os = "android",
all(unix, not(target_vendor = "apple")),
feature = "build-native-freetype"
))]
extern crate freetype;

#[cfg(target_vendor = "apple")]
pub mod coretext;

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

pub use bindings::*;
pub use crate::bindings::*;
1 change: 1 addition & 0 deletions harfbuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "harfbuzz"
version = "0.4.0"
edition = "2018"

authors = ["The Servo Project Developers"]
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion harfbuzz/src/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use crate::sys;
use std::marker::PhantomData;
use std::os::raw::{c_char, c_uint, c_void};
use std::sync::Arc;
use std::{mem, ops, ptr, slice};
use sys;

/// Blobs wrap a chunk of binary data to handle lifecycle management of data
/// while it is passed between client and HarfBuzz.
Expand Down
4 changes: 2 additions & 2 deletions harfbuzz/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use crate::sys;
use std;
use sys;

use {Direction, Language};
use crate::{Direction, Language};

/// A series of Unicode characters.
///
Expand Down
2 changes: 1 addition & 1 deletion harfbuzz/src/direction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use sys;
use crate::sys;

/// Direction of text flow during layout.
///
Expand Down
2 changes: 1 addition & 1 deletion harfbuzz/src/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#![allow(missing_docs)]

use crate::sys;
use std;
use sys;

#[derive(Copy, Clone, PartialEq, PartialOrd)]
pub struct Language {
Expand Down
2 changes: 1 addition & 1 deletion harfbuzz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
unused_qualifications
)]

pub extern crate harfbuzz_sys as sys;
pub use harfbuzz_sys as sys;

mod buffer;
pub use self::buffer::Buffer;
Expand Down

0 comments on commit fb13a24

Please sign in to comment.