Skip to content

Commit

Permalink
Fix benchmarks for the rand upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Jan 14, 2020
1 parent 20ec961 commit e7cdb53
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion benches/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ extern crate test;

use num_bigint::{BigInt, BigUint, RandBigInt};
use num_traits::{FromPrimitive, Num, One, Pow, Zero};
use rand::{SeedableRng, StdRng};
use rand::rngs::StdRng;
use rand::SeedableRng;
use std::mem::replace;
use test::Bencher;

Expand Down
3 changes: 2 additions & 1 deletion benches/gcd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ extern crate test;
use num_bigint::{BigUint, RandBigInt};
use num_integer::Integer;
use num_traits::Zero;
use rand::{SeedableRng, StdRng};
use rand::rngs::StdRng;
use rand::SeedableRng;
use test::Bencher;

fn get_rng() -> StdRng {
Expand Down
3 changes: 2 additions & 1 deletion benches/roots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ extern crate test;

use num_bigint::{BigUint, RandBigInt};
use num_traits::Pow;
use rand::{SeedableRng, StdRng};
use rand::rngs::StdRng;
use rand::SeedableRng;
use test::Bencher;

// The `big64` cases demonstrate the speed of cases where the value
Expand Down
4 changes: 2 additions & 2 deletions ci/test_full.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ if test -n "${NO_STD_FEATURES:+true}"; then
cargo test --no-default-features --features="$NO_STD_FEATURES"
fi

# make sure benchmarks can be built
# make sure benchmarks can be built and sanity-tested
if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
cargo bench --all-features --no-run
cargo test --benches --all-features
fi

case "$STD_FEATURES" in
Expand Down

0 comments on commit e7cdb53

Please sign in to comment.