rm obsolete integer to_str{,_radix} free functions
This commit is contained in:
parent
0d72f604b7
commit
46fc549fa9
27 changed files with 104 additions and 152 deletions
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue