summary refs log tree commit diff
path: root/src/libcore/fmt
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2015-02-19 21:05:35 -0800
committerBrian Anderson <banderson@mozilla.com>2015-03-02 16:12:46 -0800
commit76e9fa63ba0b6d892aa880db9c8373ede3e67c03 (patch)
tree5c932ad4ef0079ca1f4a8b3d0767f7e5984df2a5 /src/libcore/fmt
parent2ca6eaedae9ec4bff2a63f81f473aba653e46ac5 (diff)
downloadrust-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/libcore/fmt')
-rw-r--r--src/libcore/fmt/float.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs
index f92e631c1f2..81eef132b9c 100644
--- a/src/libcore/fmt/float.rs
+++ b/src/libcore/fmt/float.rs
@@ -156,7 +156,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
         deccum = deccum / radix_gen;
         deccum = deccum.trunc();
 
-        let c = char::from_digit(current_digit.to_int().unwrap() as u32, radix);
+        let c = char::from_digit(current_digit.to_isize().unwrap() as u32, radix);
         buf[end] = c.unwrap() as u8;
         end += 1;
 
@@ -211,7 +211,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
             // See note in first loop.
             let current_digit = deccum.trunc().abs();
 
-            let c = char::from_digit(current_digit.to_int().unwrap() as u32,
+            let c = char::from_digit(current_digit.to_isize().unwrap() as u32,
                                      radix);
             buf[end] = c.unwrap() as u8;
             end += 1;