about summary refs log tree commit diff
path: root/src/libcore/hash.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-18 11:17:40 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-18 11:31:57 -0700
commit2cdb23bbc08fba2f5dc7b0dcc79983fc02e32960 (patch)
tree683f1e841f369e737e6d0c26fcafe5057531566c /src/libcore/hash.rs
parentefa6675f1d632f5d524f4a7a18838c6ee1c0c447 (diff)
downloadrust-2cdb23bbc08fba2f5dc7b0dcc79983fc02e32960.tar.gz
rust-2cdb23bbc08fba2f5dc7b0dcc79983fc02e32960.zip
Replace uses of 'unchecked' with 'unsafe'
Diffstat (limited to 'src/libcore/hash.rs')
-rw-r--r--src/libcore/hash.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/hash.rs b/src/libcore/hash.rs
index 1dec739dd21..d9832036a88 100644
--- a/src/libcore/hash.rs
+++ b/src/libcore/hash.rs
@@ -85,7 +85,7 @@ trait Streaming {
 impl <A: IterBytes> A: Hash {
     #[inline(always)]
     pure fn hash_keyed(k0: u64, k1: u64) -> u64 {
-        unchecked {
+        unsafe {
             let s = &State(k0, k1);
             for self.iter_bytes(true) |bytes| {
                 s.input(bytes);
@@ -100,7 +100,7 @@ impl <A: IterBytes> A: Hash {
 pure fn hash_keyed_2<A: IterBytes,
                      B: IterBytes>(a: &A, b: &B,
                                    k0: u64, k1: u64) -> u64 {
-    unchecked {
+    unsafe {
         let s = &State(k0, k1);
         for a.iter_bytes(true) |bytes| { s.input(bytes); }
         for b.iter_bytes(true) |bytes| { s.input(bytes); }
@@ -112,7 +112,7 @@ pure fn hash_keyed_3<A: IterBytes,
                      B: IterBytes,
                      C: IterBytes>(a: &A, b: &B, c: &C,
                                    k0: u64, k1: u64) -> u64 {
-    unchecked {
+    unsafe {
         let s = &State(k0, k1);
         for a.iter_bytes(true) |bytes| { s.input(bytes); }
         for b.iter_bytes(true) |bytes| { s.input(bytes); }
@@ -126,7 +126,7 @@ pure fn hash_keyed_4<A: IterBytes,
                      C: IterBytes,
                      D: IterBytes>(a: &A, b: &B, c: &C, d: &D,
                                    k0: u64, k1: u64) -> u64 {
-    unchecked {
+    unsafe {
         let s = &State(k0, k1);
         for a.iter_bytes(true) |bytes| { s.input(bytes); }
         for b.iter_bytes(true) |bytes| { s.input(bytes); }
@@ -142,7 +142,7 @@ pure fn hash_keyed_5<A: IterBytes,
                      D: IterBytes,
                      E: IterBytes>(a: &A, b: &B, c: &C, d: &D, e: &E,
                                    k0: u64, k1: u64) -> u64 {
-    unchecked {
+    unsafe {
         let s = &State(k0, k1);
         for a.iter_bytes(true) |bytes| { s.input(bytes); }
         for b.iter_bytes(true) |bytes| { s.input(bytes); }