From bb492b68b85bf252a62424426d876e70f79bdf84 Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Thu, 28 Mar 2019 10:28:56 +0000 Subject: [PATCH] Fix benchmark test --- Cargo.toml | 1 + benches/distributions.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 36c756ef4e9..76c40223bfd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,6 +73,7 @@ rand_xoshiro = { path = "rand_xoshiro", version = "0.1" } rand_isaac = { path = "rand_isaac", version = "0.1" } rand_chacha = { path = "rand_chacha", version = "0.1" } rand_xorshift = { path = "rand_xorshift", version = "0.1" } +rand_distr = { path = "rand_distr", version = "0.1" } [build-dependencies] autocfg = "0.1" diff --git a/benches/distributions.rs b/benches/distributions.rs index f0cb769995c..28e90a87892 100644 --- a/benches/distributions.rs +++ b/benches/distributions.rs @@ -10,6 +10,7 @@ extern crate test; extern crate rand; +extern crate rand_distr; const RAND_BENCH_N: u64 = 1000; @@ -21,7 +22,7 @@ use std::time::Duration; use rand::{Rng, FromEntropy}; use rand::rngs::SmallRng; -use rand::distributions::*; +use rand_distr::{*, weighted::WeightedIndex}; macro_rules! distr_int { ($fnn:ident, $ty:ty, $distr:expr) => {