diff --git a/.travis.yml b/.travis.yml index 35313dba..3975954d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: rust script: - (cd phf && cargo test) -- (cd phf && cargo test --features core) - (cd phf_macros && cargo test --features stats) - ./.travis/build_docs.sh after_success: diff --git a/README.md b/README.md index f5c0996f..2d391e04 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,6 @@ produced, but if you use the `phf_mac` crate with the `stats` feature enabled Documentation is available at https://sfackler.github.io/rust-phf/doc/phf -The `phf/core` feature will compile the `phf` crate with a dependency on -libcore instead of libstd, enabling use in environments where libstd will not -work. - Example ======= diff --git a/phf/Cargo.toml b/phf/Cargo.toml index f7d0b3a4..d7c7c3d8 100644 --- a/phf/Cargo.toml +++ b/phf/Cargo.toml @@ -12,9 +12,6 @@ name = "phf" path = "src/lib.rs" test = false -[features] -core = ["phf_shared/core"] - [dependencies.phf_shared] path = "../phf_shared" version = "=0.6.9" diff --git a/phf/src/lib.rs b/phf/src/lib.rs index 184f18e7..b7ebd4cc 100644 --- a/phf/src/lib.rs +++ b/phf/src/lib.rs @@ -36,14 +36,7 @@ #![doc(html_root_url="https://sfackler.github.io/rust-phf/doc")] #![feature(core, no_std)] #![warn(missing_docs)] -#![no_std] -#[macro_use] -#[cfg(feature = "core")] -extern crate core; -#[macro_use] -#[cfg(not(feature = "core"))] -extern crate std; extern crate phf_shared; pub use phf_shared::PhfHash; @@ -60,16 +53,3 @@ pub mod map; pub mod set; pub mod ordered_map; pub mod ordered_set; - -#[cfg(feature = "core")] -mod std { - pub use core::{borrow, fmt, iter, option, ops, slice}; - pub mod prelude { - pub use core::prelude as v1; - } -} - -#[cfg(not(feature = "core"))] -mod core { - pub use std::{fmt, option, iter}; -} diff --git a/phf/tests/test.rs b/phf/tests/test.rs index 5f41b0e0..adba6bfb 100644 --- a/phf/tests/test.rs +++ b/phf/tests/test.rs @@ -338,13 +338,13 @@ mod ordered_map { #[test] fn test_entries() { - static MAP: phf::OrderedMap<&'static str, isize> = phf_ordered_map!( + static MAP: phf::OrderedMap<&'static str, i32> = phf_ordered_map!( "foo" => 10, "bar" => 11, "baz" => 12, ); let vec = MAP.entries().map(|(&k, &v)| (k, v)).collect::>(); - assert_eq!(vec, vec!(("foo", 10is), ("bar", 11), ("baz", 12))); + assert_eq!(vec, vec!(("foo", 10), ("bar", 11), ("baz", 12))); } #[test] @@ -360,13 +360,13 @@ mod ordered_map { #[test] fn test_values() { - static MAP: phf::OrderedMap<&'static str, isize> = phf_ordered_map!( + static MAP: phf::OrderedMap<&'static str, i32> = phf_ordered_map!( "foo" => 10, "bar" => 11, "baz" => 12, ); let vec = MAP.values().map(|&v| v).collect::>(); - assert_eq!(vec, vec!(10is, 11, 12)); + assert_eq!(vec, vec!(10, 11, 12)); } #[test] diff --git a/phf_shared/Cargo.toml b/phf_shared/Cargo.toml index dedee7ae..d51eef15 100644 --- a/phf_shared/Cargo.toml +++ b/phf_shared/Cargo.toml @@ -10,7 +10,3 @@ repository = "https://github.com/sfackler/rust-phf" name = "phf_shared" path = "src/lib.rs" test = false - -[features] - -core = [] diff --git a/phf_shared/src/lib.rs b/phf_shared/src/lib.rs index 357879ee..6ccabb12 100644 --- a/phf_shared/src/lib.rs +++ b/phf_shared/src/lib.rs @@ -1,19 +1,9 @@ #![feature(hash)] -#![cfg_attr(feature = "core", feature(no_std))] -#![cfg_attr(feature = "core", no_std)] #![doc(html_root_url="http://sfackler.github.io/rust-phf/doc")] -#[cfg(feature = "core")] -extern crate core; - use std::str::StrExt; use std::hash::{Hasher, Hash, SipHasher}; -#[cfg(feature = "core")] -mod std { - pub use core::{slice, str, hash}; -} - #[inline] pub fn displace(f1: u32, f2: u32, d1: u32, d2: u32) -> u32 { d2 + f1 * d1 + f2