Skip to content

Commit

Permalink
Use out of tree rand
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Feb 6, 2015
1 parent d9ddf45 commit 9e1623b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions phf_macros/Cargo.toml
Expand Up @@ -15,6 +15,9 @@ test = false
[features]
stats = ["time"]

[dependencies]
rand = "0.1"

[dependencies.phf_shared]
path = "../phf_shared"
version = "=0.6.2"
Expand Down
2 changes: 1 addition & 1 deletion phf_macros/src/lib.rs
Expand Up @@ -2,7 +2,7 @@
//!
//! See the documentation for the `phf` crate for more details.
#![doc(html_root_url="http://sfackler.github.io/doc")]
#![feature(plugin_registrar, quote, rustc_private, std_misc, rand, hash, core, os)]
#![feature(plugin_registrar, quote, rustc_private, std_misc, hash, core, env)]

extern crate rand;
extern crate syntax;
Expand Down
4 changes: 2 additions & 2 deletions phf_macros/src/util.rs
@@ -1,4 +1,4 @@
use std::os;
use std::env;
use std::rc::Rc;
use std::hash::{self, Hash, Hasher};
use std::iter::repeat;
Expand Down Expand Up @@ -102,7 +102,7 @@ pub fn generate_hash(cx: &mut ExtCtxt, sp: Span, entries: &[Entry]) -> HashState
}
}
let time = precise_time_s() - start;
if cfg!(feature = "stats") && os::getenv("PHF_STATS").is_some() {
if cfg!(feature = "stats") && env::var("PHF_STATS").is_some() {
cx.span_note(sp, &*format!("PHF generation took {} seconds", time));
}

Expand Down

0 comments on commit 9e1623b

Please sign in to comment.