Skip to content

Commit

Permalink
Remove unnecessary casts from benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
jongiddy committed Jun 9, 2020
1 parent 856ad28 commit ae79ebe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benches/reject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ macro_rules! sample_dist {
#[bench]
fn $fnn(b: &mut Bencher) {
let mut rng = thread_rng();
let dist = <UniformInt<u32> as UniformSampler>::new($low, $high);
let dist = UniformInt::<u32>::new($low, $high);
b.iter(|| {
test::black_box(dist.sample(&mut rng));
test::black_box(dist.sample(&mut rng));
Expand All @@ -38,8 +38,8 @@ macro_rules! sample_single {
fn $fnn(b: &mut Bencher) {
let mut rng = thread_rng();
b.iter(|| {
test::black_box(<UniformInt<u32> as UniformSampler>::sample_single($low, $high, &mut rng));
test::black_box(<UniformInt<u32> as UniformSampler>::sample_single($low, $high, &mut rng));
test::black_box(UniformInt::<u32>::sample_single($low, $high, &mut rng));
test::black_box(UniformInt::<u32>::sample_single($low, $high, &mut rng));
});
}
};
Expand Down

0 comments on commit ae79ebe

Please sign in to comment.