diff options
| author | Brian Anderson <banderson@mozilla.com> | 2015-02-19 21:05:35 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2015-03-02 16:12:46 -0800 |
| commit | 76e9fa63ba0b6d892aa880db9c8373ede3e67c03 (patch) | |
| tree | 5c932ad4ef0079ca1f4a8b3d0767f7e5984df2a5 /src/libstd/num | |
| parent | 2ca6eaedae9ec4bff2a63f81f473aba653e46ac5 (diff) | |
| download | rust-76e9fa63ba0b6d892aa880db9c8373ede3e67c03.tar.gz rust-76e9fa63ba0b6d892aa880db9c8373ede3e67c03.zip | |
core: Audit num module for int/uint
* 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. [breaking-change]
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(); |
