diff options
| author | Steven Fackler <[email protected]> | 2016-01-30 12:55:22 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-05-03 20:24:07 -0700 |
| commit | fa622326490e1dd27df4d42b4097ca574deedb3f (patch) | |
| tree | f6b60233b5f71847a3fbd87aa13a74f16fe79ddf /openssl/src/bio | |
| parent | Remove deprecated methods (diff) | |
| download | rust-openssl-fa622326490e1dd27df4d42b4097ca574deedb3f.tar.xz rust-openssl-fa622326490e1dd27df4d42b4097ca574deedb3f.zip | |
Error reform
Diffstat (limited to 'openssl/src/bio')
| -rw-r--r-- | openssl/src/bio/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openssl/src/bio/mod.rs b/openssl/src/bio/mod.rs index 4c9b20b0..2e99284f 100644 --- a/openssl/src/bio/mod.rs +++ b/openssl/src/bio/mod.rs @@ -6,7 +6,7 @@ use std::cmp; use ffi; use ffi_extras; -use ssl::error::SslError; +use error::ErrorStack; pub struct MemBio { bio: *mut ffi::BIO, @@ -25,7 +25,7 @@ impl Drop for MemBio { impl MemBio { /// Creates a new owned memory based BIO - pub fn new() -> Result<MemBio, SslError> { + pub fn new() -> Result<MemBio, ErrorStack> { ffi::init(); let bio = unsafe { ffi::BIO_new(ffi::BIO_s_mem()) }; @@ -81,7 +81,7 @@ impl Read for MemBio { if is_eof != 0 { Ok(0) } else { - Err(io::Error::new(io::ErrorKind::Other, SslError::get())) + Err(io::Error::new(io::ErrorKind::Other, ErrorStack::get())) } } else { Ok(ret as usize) @@ -95,7 +95,7 @@ impl Write for MemBio { let ret = unsafe { ffi::BIO_write(self.bio, buf.as_ptr() as *const c_void, len) }; if ret < 0 { - Err(io::Error::new(io::ErrorKind::Other, SslError::get())) + Err(io::Error::new(io::ErrorKind::Other, ErrorStack::get())) } else { Ok(ret as usize) } |