diff options
| author | bors <bors@rust-lang.org> | 2015-03-03 02:05:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-03 02:05:18 +0000 |
| commit | 5457eab3c5f1abeb0ba4e9275d55a398f6a09134 (patch) | |
| tree | 03faf98dc680da1c6cb4cff46593d295c971df07 /src/libstd/num | |
| parent | b4c965ee803a4521d8b4575f634e036f93e408f3 (diff) | |
| parent | 76e9fa63ba0b6d892aa880db9c8373ede3e67c03 (diff) | |
| download | rust-5457eab3c5f1abeb0ba4e9275d55a398f6a09134.tar.gz rust-5457eab3c5f1abeb0ba4e9275d55a398f6a09134.zip | |
Auto merge of #22600 - brson:num, r=Gankro
* count_ones/zeros, trailing_ones/zeros return u32, not usize * rotate_left/right take u32, not usize * RADIX, MANTISSA_DIGITS, DIGITS, BITS, BYTES are u32, not usize Doesn't touch pow because there's another PR for it. cc https://github.com/rust-lang/rust/issues/22240 r? @Gankro
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/strconv.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index f6d05f961e1..ca2e6ba5d5d 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -253,7 +253,7 @@ pub fn float_to_str_bytes_common<T: Float>( deccum = deccum / radix_gen; deccum = deccum.trunc(); - buf.push(char::from_digit(current_digit.to_int().unwrap() as u32, radix) + buf.push(char::from_digit(current_digit.to_isize().unwrap() as u32, radix) .unwrap() as u8); // No more digits to calculate for the non-fractional part -> break @@ -310,7 +310,7 @@ pub fn float_to_str_bytes_common<T: Float>( let current_digit = deccum.trunc().abs(); buf.push(char::from_digit( - current_digit.to_int().unwrap() as u32, radix).unwrap() as u8); + current_digit.to_isize().unwrap() as u32, radix).unwrap() as u8); // Decrease the deccumulator one fractional digit at a time deccum = deccum.fract(); |
