diff options
Diffstat (limited to 'src/libstd/num/strconv.rs')
| -rw-r--r-- | src/libstd/num/strconv.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 5d713f1a622..1028cef9dc6 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -750,16 +750,16 @@ mod bench { #[bench] fn uint_to_str_rand(bh: &mut BenchHarness) { let mut rng = XorShiftRng::new(); - do bh.iter { + bh.iter(|| { rng.gen::<uint>().to_str(); - } + }) } #[bench] fn float_to_str_rand(bh: &mut BenchHarness) { let mut rng = XorShiftRng::new(); - do bh.iter { + bh.iter(|| { f64::to_str(rng.gen()); - } + }) } } |
