]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #15570 : omasanori/rust/radix, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 11 Jul 2014 05:36:37 +0000 (05:36 +0000)
committerbors <bors@rust-lang.org>
Fri, 11 Jul 2014 05:36:37 +0000 (05:36 +0000)
src/libcollections/hash/sip.rs

index 4fd98538af7ddc93068901d28b657698a6d20f05..1c7e03f70c8896531a6c4b6bea254f6d06faff85 100644 (file)
@@ -269,7 +269,7 @@ pub fn hash_with_keys<T: Hash<SipState>>(k0: u64, k1: u64, value: &T) -> u64 {
 mod tests {
     use test::Bencher;
     use std::prelude::*;
-    use std::num::ToStrRadix;
+    use std::fmt;
 
     use str::Str;
     use string::String;
@@ -370,7 +370,7 @@ fn test_siphash() {
         fn to_hex_str(r: &[u8, ..8]) -> String {
             let mut s = String::new();
             for b in r.iter() {
-                s.push_str((*b as uint).to_str_radix(16u).as_slice());
+                s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
             }
             s
         }
@@ -391,7 +391,7 @@ fn result_str(h: u64) -> String {
             let r = result_bytes(h);
             let mut s = String::new();
             for b in r.iter() {
-                s.push_str((*b as uint).to_str_radix(16u).as_slice());
+                s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
             }
             s
         }