From df4f27e40e872721535b9319f04d8176b186e799 Mon Sep 17 00:00:00 2001 From: Victor Koenders Date: Fri, 8 Jun 2018 14:01:26 +0200 Subject: [PATCH] Fixed warnings --- benches/common/macros.rs | 6 +++--- benches/construction.rs | 5 +++-- benches/mat.rs | 3 ++- benches/quat.rs | 2 +- benches/vec.rs | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/benches/common/macros.rs b/benches/common/macros.rs index 54eac6d..265a1af 100644 --- a/benches/common/macros.rs +++ b/benches/common/macros.rs @@ -19,7 +19,7 @@ macro_rules! bench_binop { fn $name(bh: &mut Bencher) { const LEN: usize = 1 << 13; - let mut rng = IsaacRng::new_unseeded(); + let mut rng = IsaacRng::from_entropy(); let elems1: Vec<$t1> = (0..LEN).map(|_| rng.gen::<$t1>()).collect(); let elems2: Vec<$t2> = (0..LEN).map(|_| rng.gen::<$t2>()).collect(); @@ -42,7 +42,7 @@ macro_rules! bench_unop { fn $name(bh: &mut Bencher) { const LEN: usize = 1 << 13; - let mut rng = IsaacRng::new_unseeded(); + let mut rng = IsaacRng::from_entropy(); let mut elems: Vec<$t> = (0..LEN).map(|_| rng.gen::<$t>()).collect(); let mut i = 0; @@ -64,7 +64,7 @@ macro_rules! bench_construction { fn $name(bh: &mut Bencher) { const LEN: usize = 1 << 13; - let mut rng = IsaacRng::new_unseeded(); + let mut rng = IsaacRng::from_entropy(); $(let $args: Vec<$types> = (0..LEN).map(|_| rng.gen::<$types>()).collect();)* let mut i = 0; diff --git a/benches/construction.rs b/benches/construction.rs index b3a2a7b..97244e8 100644 --- a/benches/construction.rs +++ b/benches/construction.rs @@ -14,12 +14,13 @@ // limitations under the License. #![feature(test)] +#![allow(unused_macros)] extern crate cgmath; extern crate rand; extern crate test; -use rand::{IsaacRng, Rng}; +use rand::{IsaacRng, Rng, FromEntropy}; use test::Bencher; use cgmath::*; @@ -30,7 +31,7 @@ mod macros; fn bench_from_axis_angle>(bh: &mut Bencher) { const LEN: usize = 1 << 13; - let mut rng = IsaacRng::new_unseeded(); + let mut rng = IsaacRng::from_entropy(); let axis: Vec<_> = (0..LEN).map(|_| rng.gen::>()).collect(); let angle: Vec<_> = (0..LEN).map(|_| rng.gen::>()).collect(); diff --git a/benches/mat.rs b/benches/mat.rs index 5400792..f6fbf6e 100644 --- a/benches/mat.rs +++ b/benches/mat.rs @@ -14,12 +14,13 @@ // limitations under the License. #![feature(test)] +#![allow(unused_macros)] extern crate cgmath; extern crate rand; extern crate test; -use rand::{IsaacRng, Rng}; +use rand::{IsaacRng, Rng, FromEntropy}; use std::ops::*; use test::Bencher; diff --git a/benches/quat.rs b/benches/quat.rs index 57b0f93..0176216 100644 --- a/benches/quat.rs +++ b/benches/quat.rs @@ -19,7 +19,7 @@ extern crate cgmath; extern crate rand; extern crate test; -use rand::{IsaacRng, Rng}; +use rand::{IsaacRng, Rng, FromEntropy}; use std::ops::*; use test::Bencher; diff --git a/benches/vec.rs b/benches/vec.rs index 7d06275..c1e62d6 100644 --- a/benches/vec.rs +++ b/benches/vec.rs @@ -14,12 +14,13 @@ // limitations under the License. #![feature(test)] +#![allow(unused_macros)] extern crate cgmath; extern crate rand; extern crate test; -use rand::{IsaacRng, Rng}; +use rand::{IsaacRng, Rng, FromEntropy}; use std::ops::*; use test::Bencher;