diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2015-02-27 21:04:15 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2015-03-01 01:58:55 +0100 |
| commit | 1c4fb909ffad8328983d893f2fefdb17215f2b21 (patch) | |
| tree | b53f0a0dbca3cfa46cf74f6dd3d43d598314b019 /src/libstd/num | |
| parent | 890293655251c372ea99694c0c9f0795e2663286 (diff) | |
| download | rust-1c4fb909ffad8328983d893f2fefdb17215f2b21.tar.gz rust-1c4fb909ffad8328983d893f2fefdb17215f2b21.zip | |
Make Int::pow() take exp as u32 instead usize
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs index 15ae8b027e1..d776079efae 100644 --- a/src/libstd/num/mod.rs +++ b/src/libstd/num/mod.rs @@ -1830,6 +1830,6 @@ mod bench { #[bench] fn bench_pow_function(b: &mut Bencher) { let v = (0..1024).collect::<Vec<_>>(); - b.iter(|| {v.iter().fold(0, |old, new| old.pow(*new));}); + b.iter(|| {v.iter().fold(0, |old, new| old.pow(*new as u32));}); } } |
