aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-01-28 08:47:16 -0800
committerSteven Fackler <[email protected]>2015-01-28 08:47:16 -0800
commit030cf5fe88f292a48b71789f5d0e9a9b133c5c09 (patch)
treee105f6e7ddf28efbc6f58f8424f87b1b1bc46da6 /src/crypto
parentRelease v0.2.17 (diff)
downloadrust-openssl-030cf5fe88f292a48b71789f5d0e9a9b133c5c09.tar.xz
rust-openssl-030cf5fe88f292a48b71789f5d0e9a9b133c5c09.zip
Fix for IO changes
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/hash.rs8
-rw-r--r--src/crypto/pkey.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/crypto/hash.rs b/src/crypto/hash.rs
index 638a2254..6d751ade 100644
--- a/src/crypto/hash.rs
+++ b/src/crypto/hash.rs
@@ -1,6 +1,6 @@
use libc::c_uint;
use std::ptr;
-use std::io;
+use std::old_io;
use std::iter::repeat;
use ffi;
@@ -59,8 +59,8 @@ pub struct Hasher {
len: u32,
}
-impl io::Writer for Hasher {
- fn write(&mut self, buf: &[u8]) -> io::IoResult<()> {
+impl old_io::Writer for Hasher {
+ fn write_all(&mut self, buf: &[u8]) -> old_io::IoResult<()> {
self.update(buf);
Ok(())
}
@@ -163,7 +163,7 @@ mod tests {
pub fn hash_writer(t: super::HashType, data: &[u8]) -> Vec<u8> {
let mut h = super::Hasher::new(t);
- h.write(data).unwrap();
+ h.write_all(data).unwrap();
h.finalize()
}
diff --git a/src/crypto/pkey.rs b/src/crypto/pkey.rs
index f2ba89dc..1aa5cc0e 100644
--- a/src/crypto/pkey.rs
+++ b/src/crypto/pkey.rs
@@ -149,7 +149,7 @@ impl PKey {
}
let buf = try!(mem_bio.read_to_end().map_err(StreamError));
- writer.write(buf.as_slice()).map_err(StreamError)
+ writer.write_all(buf.as_slice()).map_err(StreamError)
}
/**