about summary refs log tree commit diff
path: root/src/libcoretest/hash
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-02-01 21:53:25 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-02-05 13:45:01 -0500
commit17bc7d8d5be3be9674d702ccad2fa88c487d23b0 (patch)
tree325defba0f55b48273cd3f0814fe6c083dee5d41 /src/libcoretest/hash
parent2c05354211b04a52cc66a0b8ad8b2225eaf9e972 (diff)
downloadrust-17bc7d8d5be3be9674d702ccad2fa88c487d23b0.tar.gz
rust-17bc7d8d5be3be9674d702ccad2fa88c487d23b0.zip
cleanup: replace `as[_mut]_slice()` calls with deref coercions
Diffstat (limited to 'src/libcoretest/hash')
-rw-r--r--src/libcoretest/hash/sip.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcoretest/hash/sip.rs b/src/libcoretest/hash/sip.rs
index a493f71925e..248cad32ef4 100644
--- a/src/libcoretest/hash/sip.rs
+++ b/src/libcoretest/hash/sip.rs
@@ -110,7 +110,7 @@ fn test_siphash() {
     fn to_hex_str(r: &[u8; 8]) -> String {
         let mut s = String::new();
         for b in r {
-            s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
+            s.push_str(format!("{}", fmt::radix(*b, 16)));
         }
         s
     }
@@ -131,7 +131,7 @@ fn test_siphash() {
         let r = result_bytes(h);
         let mut s = String::new();
         for b in &r {
-            s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
+            s.push_str(format!("{}", fmt::radix(*b, 16)));
         }
         s
     }
@@ -139,12 +139,12 @@ fn test_siphash() {
     while t < 64 {
         debug!("siphash test {}: {}", t, buf);
         let vec = u8to64_le!(vecs[t], 0);
-        let out = hash_with_keys(k0, k1, &Bytes(buf.as_slice()));
+        let out = hash_with_keys(k0, k1, &Bytes(buf));
         debug!("got {}, expected {}", out, vec);
         assert_eq!(vec, out);
 
         state_full.reset();
-        state_full.write(buf.as_slice());
+        state_full.write(buf);
         let f = result_str(state_full.result());
         let i = result_str(state_inc.result());
         let v = to_hex_str(&vecs[t]);