diff options
Diffstat (limited to 'crypto/hash.rs')
| -rw-r--r-- | crypto/hash.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/hash.rs b/crypto/hash.rs index 9a1a078a..c4d27a7a 100644 --- a/crypto/hash.rs +++ b/crypto/hash.rs @@ -1,7 +1,7 @@ use std::libc::c_uint; use std::libc; use std::ptr; -use std::vec; +use std::slice; pub enum HashType { MD5, @@ -78,7 +78,7 @@ impl Hasher { */ pub fn final(&self) -> ~[u8] { unsafe { - let mut res = vec::from_elem(self.len, 0u8); + let mut res = slice::from_elem(self.len, 0u8); EVP_DigestFinal(self.ctx, res.as_mut_ptr(), ptr::null()); res } |