about summary refs log tree commit diff
path: root/src/libcore/fmt
diff options
context:
space:
mode:
authorAlfie John <alfiej@fastmail.fm>2015-01-22 14:08:56 +0000
committerAlfie John <alfiej@fastmail.fm>2015-01-25 00:17:41 +0000
commitf67e7470b31a38e80c9f1007e4182ff5b56db2f7 (patch)
tree20f875e1138930df63de91297fbef3bd7cff01e4 /src/libcore/fmt
parentbb7cc4eb26e87ec4cb2acdc5bc3a7d25b9c817be (diff)
downloadrust-f67e7470b31a38e80c9f1007e4182ff5b56db2f7.tar.gz
rust-f67e7470b31a38e80c9f1007e4182ff5b56db2f7.zip
Moving away from deprecated i/u suffixes in libcore
Diffstat (limited to 'src/libcore/fmt')
-rw-r--r--src/libcore/fmt/float.rs6
-rw-r--r--src/libcore/fmt/mod.rs6
-rw-r--r--src/libcore/fmt/num.rs2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs
index 245dc00d838..50123499eba 100644
--- a/src/libcore/fmt/float.rs
+++ b/src/libcore/fmt/float.rs
@@ -53,7 +53,7 @@ pub enum SignFormat {
     SignNeg
 }
 
-static DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11u;
+static DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11;
 
 /// Converts a number to its string representation as a byte vector.
 /// This is meant to be a common base implementation for all numeric string
@@ -191,7 +191,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
     if deccum != _0 || (limit_digits && exact && digit_count > 0) {
         buf[end] = b'.';
         end += 1;
-        let mut dig = 0u;
+        let mut dig = 0;
 
         // calculate new digits while
         // - there is no limit and there are digits left
@@ -218,7 +218,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
 
             // Decrease the deccumulator one fractional digit at a time
             deccum = deccum.fract();
-            dig += 1u;
+            dig += 1;
         }
 
         // If digits are limited, and that limit has been reached,
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 0e8d31a62ee..17eff98d429 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -560,8 +560,8 @@ impl<'a> Formatter<'a> {
         };
 
         let (pre_pad, post_pad) = match align {
-            rt::AlignLeft => (0u, padding),
-            rt::AlignRight | rt::AlignUnknown => (padding, 0u),
+            rt::AlignLeft => (0, padding),
+            rt::AlignRight | rt::AlignUnknown => (padding, 0),
             rt::AlignCenter => (padding / 2, (padding + 1) / 2),
         };
 
@@ -846,7 +846,7 @@ macro_rules! tuple {
             fn fmt(&self, f: &mut Formatter) -> Result {
                 try!(write!(f, "("));
                 let ($(ref $name,)*) = *self;
-                let mut n = 0i;
+                let mut n = 0;
                 $(
                     if n > 0 {
                         try!(write!(f, ", "));
diff --git a/src/libcore/fmt/num.rs b/src/libcore/fmt/num.rs
index c456b3379e8..a659a9988bb 100644
--- a/src/libcore/fmt/num.rs
+++ b/src/libcore/fmt/num.rs
@@ -145,7 +145,7 @@ pub struct RadixFmt<T, R>(T, R);
 ///
 /// ```
 /// use std::fmt::radix;
-/// assert_eq!(format!("{}", radix(55i, 36)), "1j".to_string());
+/// assert_eq!(format!("{}", radix(55, 36)), "1j".to_string());
 /// ```
 #[unstable = "may be renamed or move to a different module"]
 pub fn radix<T>(x: T, base: u8) -> RadixFmt<T, Radix> {