Skip to content

Commit

Permalink
Fix no_std errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Nov 11, 2017
1 parent 08dc010 commit 14136e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ categories = ["algorithms"]
[features]
default = ["std"]
nightly = ["i128_support"]
std = []
std = ["rand_core/std"]
i128_support = ["rand_core/i128_support"]

[dependencies]
libc = "0.2"
rand_core = { path = 'rand_core' }

[dependencies.rand_core]
path = 'rand_core'
default-features = false

[target.'cfg(target_os = "fuchsia")'.dependencies]
fuchsia-zircon = "^0.2.1"
Expand Down
2 changes: 1 addition & 1 deletion benches/generators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ macro_rules! init_gen {
($fnn:ident, $gen:ident) => {
#[bench]
fn $fnn(b: &mut Bencher) {
let mut rng = OsRng::new().unwrap();
let mut rng = XorShiftRng::new().unwrap();
b.iter(|| {
black_box($gen::from_rng(&mut rng).unwrap());
});
Expand Down
1 change: 1 addition & 0 deletions src/jitter_rng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ impl JitterRng {
/// # try_main().unwrap();
/// # }
/// ```
#[cfg(feature="std")]
pub fn timer_stats(&mut self, var_rounds: bool) -> i64 {
let time = get_nstime();
self.memaccess(var_rounds);
Expand Down

0 comments on commit 14136e7

Please sign in to comment.