From 46fc549fa98d473f925b04e53d08f26c2e15bc2a Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 17 Aug 2013 22:47:54 -0400 Subject: rm obsolete integer to_str{,_radix} free functions --- src/libextra/crypto/digest.rs | 3 +-- src/libextra/md4.rs | 3 +-- src/libextra/num/bigint.rs | 2 +- src/libextra/time.rs | 8 +++----- 4 files changed, 6 insertions(+), 10 deletions(-) (limited to 'src/libextra') diff --git a/src/libextra/crypto/digest.rs b/src/libextra/crypto/digest.rs index c7f228af332..d2d6b540cff 100644 --- a/src/libextra/crypto/digest.rs +++ b/src/libextra/crypto/digest.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::uint; use std::vec; @@ -71,7 +70,7 @@ pub trait Digest { fn to_hex(rr: &[u8]) -> ~str { let mut s = ~""; for b in rr.iter() { - let hex = uint::to_str_radix(*b as uint, 16u); + let hex = (*b as uint).to_str_radix(16u); if hex.len() == 1 { s.push_char('0'); } diff --git a/src/libextra/md4.rs b/src/libextra/md4.rs index 2c60be44519..abce22f98c6 100644 --- a/src/libextra/md4.rs +++ b/src/libextra/md4.rs @@ -9,7 +9,6 @@ // except according to those terms. -use std::uint; use std::vec; struct Quad { @@ -121,7 +120,7 @@ pub fn md4_str(msg: &[u8]) -> ~str { if byte <= 16u8 { result.push_char('0') } - result.push_str(uint::to_str_radix(byte as uint, 16u)); + result.push_str((byte as uint).to_str_radix(16u)); i += 1u32; } } diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs index 354696ef420..c86c4dd07ed 100644 --- a/src/libextra/num/bigint.rs +++ b/src/libextra/num/bigint.rs @@ -525,7 +525,7 @@ impl ToStrRadix for BigUint { if v.is_empty() { return ~"0" } let mut s = str::with_capacity(v.len() * l); for n in v.rev_iter() { - let ss = uint::to_str_radix(*n as uint, radix); + let ss = (*n as uint).to_str_radix(radix); s.push_str("0".repeat(l - ss.len())); s.push_str(ss); } diff --git a/src/libextra/time.rs b/src/libextra/time.rs index ab35bf2386c..257d941e4af 100644 --- a/src/libextra/time.rs +++ b/src/libextra/time.rs @@ -10,8 +10,6 @@ #[allow(missing_doc)]; - -use std::int; use std::io; use std::num; use std::str; @@ -824,7 +822,7 @@ fn do_strftime(format: &str, tm: &Tm) -> ~str { //'U' {} 'u' => { let i = tm.tm_wday as int; - int::to_str(if i == 0 { 7 } else { i }) + (if i == 0 { 7 } else { i }).to_str() } //'V' {} 'v' => { @@ -834,10 +832,10 @@ fn do_strftime(format: &str, tm: &Tm) -> ~str { parse_type('Y', tm)) } //'W' {} - 'w' => int::to_str(tm.tm_wday as int), + 'w' => (tm.tm_wday as int).to_str(), //'X' {} //'x' {} - 'Y' => int::to_str(tm.tm_year as int + 1900), + 'Y' => (tm.tm_year as int + 1900).to_str(), 'y' => fmt!("%02d", (tm.tm_year as int + 1900) % 100), 'Z' => tm.tm_zone.clone(), 'z' => { -- cgit 1.4.1-3-g733a5