diff --git a/phf/Cargo.toml b/phf/Cargo.toml index 1071c63c..85f98320 100644 --- a/phf/Cargo.toml +++ b/phf/Cargo.toml @@ -5,6 +5,7 @@ version = "0.7.24" license = "MIT" description = "Runtime support for perfect hash function data structures" repository = "https://github.com/sfackler/rust-phf" +edition = "2018" [lib] name = "phf" diff --git a/phf/src/lib.rs b/phf/src/lib.rs index 28e6b86b..389aabe9 100644 --- a/phf/src/lib.rs +++ b/phf/src/lib.rs @@ -44,10 +44,6 @@ #[cfg(not(feature = "core"))] extern crate std as core; -extern crate phf_shared; -#[cfg(feature = "macros")] -extern crate phf_macros; - #[cfg(feature = "macros")] pub use phf_macros::*; @@ -55,13 +51,13 @@ use core::ops::Deref; pub use phf_shared::PhfHash; #[doc(inline)] -pub use map::Map; +pub use self::map::Map; #[doc(inline)] -pub use set::Set; +pub use self::set::Set; #[doc(inline)] -pub use ordered_map::OrderedMap; +pub use self::ordered_map::OrderedMap; #[doc(inline)] -pub use ordered_set::OrderedSet; +pub use self::ordered_set::OrderedSet; pub mod map; pub mod set; diff --git a/phf/src/map.rs b/phf/src/map.rs index efabf31b..bd743516 100644 --- a/phf/src/map.rs +++ b/phf/src/map.rs @@ -5,7 +5,7 @@ use core::slice; use core::fmt; use core::iter::IntoIterator; use phf_shared::{self, PhfHash}; -use Slice; +use crate::Slice; /// An immutable map constructed at compile time. /// diff --git a/phf/src/ordered_map.rs b/phf/src/ordered_map.rs index 82567a67..239ce95f 100644 --- a/phf/src/ordered_map.rs +++ b/phf/src/ordered_map.rs @@ -6,7 +6,7 @@ use core::fmt; use core::slice; use phf_shared::{self, PhfHash}; -use Slice; +use crate::Slice; /// An order-preserving immutable map constructed at compile time. /// diff --git a/phf/src/ordered_set.rs b/phf/src/ordered_set.rs index 622fad9e..dbff7de1 100644 --- a/phf/src/ordered_set.rs +++ b/phf/src/ordered_set.rs @@ -2,8 +2,7 @@ use core::borrow::Borrow; use core::iter::IntoIterator; use core::fmt; -use ordered_map; -use {PhfHash, OrderedMap}; +use crate::{ordered_map, PhfHash, OrderedMap}; /// An order-preserving immutable set constructed at compile time. /// diff --git a/phf/src/set.rs b/phf/src/set.rs index 04ed9a00..9588d4a7 100644 --- a/phf/src/set.rs +++ b/phf/src/set.rs @@ -3,9 +3,7 @@ use core::borrow::Borrow; use core::iter::IntoIterator; use core::fmt; -use PhfHash; -use map; -use Map; +use crate::{map, Map, PhfHash}; /// An immutable set constructed at compile time. /// diff --git a/phf_codegen/test/Cargo.toml b/phf_codegen/test/Cargo.toml index 8c4d662f..492c37c7 100644 --- a/phf_codegen/test/Cargo.toml +++ b/phf_codegen/test/Cargo.toml @@ -3,6 +3,7 @@ name = "phf_codegen_test" authors = ["Steven Fackler "] version = "0.0.0" build = "build.rs" +edition = "2018" [dependencies] unicase = "2.4.0" diff --git a/phf_codegen/test/src/lib.rs b/phf_codegen/test/src/lib.rs index 16be9c82..2ae3a55c 100644 --- a/phf_codegen/test/src/lib.rs +++ b/phf_codegen/test/src/lib.rs @@ -1,6 +1,3 @@ -extern crate phf; -extern crate unicase; - #[cfg(test)] mod test { use unicase::UniCase; diff --git a/phf_generator/Cargo.toml b/phf_generator/Cargo.toml index 6c4451fe..b3b41bc0 100644 --- a/phf_generator/Cargo.toml +++ b/phf_generator/Cargo.toml @@ -5,6 +5,7 @@ version = "0.7.24" license = "MIT" description = "PHF generation logic" repository = "https://github.com/sfackler/rust-phf" +edition = "2018" [dependencies] rand = "0.6" diff --git a/phf_shared/Cargo.toml b/phf_shared/Cargo.toml index b63ea601..1bafcd8c 100644 --- a/phf_shared/Cargo.toml +++ b/phf_shared/Cargo.toml @@ -5,6 +5,7 @@ version = "0.7.24" license = "MIT" description = "Support code shared by PHF libraries" repository = "https://github.com/sfackler/rust-phf" +edition = "2018" [lib] name = "phf_shared"