about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-01-24 23:47:32 -0800
committerKevin Cantu <me@kevincantu.org>2012-01-24 23:47:32 -0800
commit9750e83a17a8f9f865eae757dcdccf374b1c82b7 (patch)
treea9047885382a5f8ba6e6606969c520b587d918b6 /src/libcore
parent2496dccae4622cb5fea9ae8f54adb0b83eadaf07 (diff)
Replace uses of str::unsafe_from_byte
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/str.rs2
-rw-r--r--src/libcore/uint.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index 5febb443828..36453d78c98 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -146,7 +146,7 @@ Function: unsafe_from_byte
 Converts a byte to a string. Does not verify that the byte is
 valid UTF-8.
 
-FIXME: rename to 'from_byte'
+FIXME: REMOVE.
 */
 fn unsafe_from_byte(u: u8) -> str { unsafe_from_bytes([u]) }
 
diff --git a/src/libcore/uint.rs b/src/libcore/uint.rs
index 8d032610e17..2112399ba80 100644
--- a/src/libcore/uint.rs
+++ b/src/libcore/uint.rs
@@ -236,12 +236,12 @@ fn to_str(num: uint, radix: uint) -> str {
     if n == 0u { ret "0"; }
     let s: str = "";
     while n != 0u {
-        s += str::unsafe_from_byte(digit(n % radix) as u8);
+        s += str::from_byte(digit(n % radix) as u8);
         n /= radix;
     }
     let s1: str = "";
     let len: uint = str::byte_len(s);
-    while len != 0u { len -= 1u; s1 += str::unsafe_from_byte(s[len]); }
+    while len != 0u { len -= 1u; s1 += str::from_byte(s[len]); }
     ret s1;
 }