Skip to content

Commit e11e094

Browse files
committed
auto merge of #15570 : omasanori/rust/radix, r=alexcrichton
2 parents b57d272 + 780a829 commit e11e094

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcollections/hash/sip.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub fn hash_with_keys<T: Hash<SipState>>(k0: u64, k1: u64, value: &T) -> u64 {
269269
mod tests {
270270
use test::Bencher;
271271
use std::prelude::*;
272-
use std::num::ToStrRadix;
272+
use std::fmt;
273273

274274
use str::Str;
275275
use string::String;
@@ -370,7 +370,7 @@ mod tests {
370370
fn to_hex_str(r: &[u8, ..8]) -> String {
371371
let mut s = String::new();
372372
for b in r.iter() {
373-
s.push_str((*b as uint).to_str_radix(16u).as_slice());
373+
s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
374374
}
375375
s
376376
}
@@ -391,7 +391,7 @@ mod tests {
391391
let r = result_bytes(h);
392392
let mut s = String::new();
393393
for b in r.iter() {
394-
s.push_str((*b as uint).to_str_radix(16u).as_slice());
394+
s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
395395
}
396396
s
397397
}

0 commit comments

Comments
 (0)