diff options
| author | Steven Fackler <[email protected]> | 2017-10-03 20:31:22 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-10-03 20:31:22 -0700 |
| commit | fc9f10d4e596953141165a2b1a3513fbaa579658 (patch) | |
| tree | 11a6f6d11bc412fc89a4bfb3517ced56bf047012 /openssl/src/bio.rs | |
| parent | Merge pull request #743 from AndyGauge/doc-asn1 (diff) | |
| parent | Convert try! usage to ? (diff) | |
| download | rust-openssl-fc9f10d4e596953141165a2b1a3513fbaa579658.tar.xz rust-openssl-fc9f10d4e596953141165a2b1a3513fbaa579658.zip | |
Merge pull request #750 from johnthagen/remove-try
Convert try! usage to ?
Diffstat (limited to 'openssl/src/bio.rs')
| -rw-r--r-- | openssl/src/bio.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openssl/src/bio.rs b/openssl/src/bio.rs index ab00fe42..56ba1f3d 100644 --- a/openssl/src/bio.rs +++ b/openssl/src/bio.rs @@ -23,10 +23,10 @@ impl<'a> MemBioSlice<'a> { assert!(buf.len() <= c_int::max_value() as usize); let bio = unsafe { - try!(cvt_p(BIO_new_mem_buf( + cvt_p(BIO_new_mem_buf( buf.as_ptr() as *const _, buf.len() as c_int, - ))) + ))? }; Ok(MemBioSlice(bio, PhantomData)) @@ -51,7 +51,7 @@ impl MemBio { pub fn new() -> Result<MemBio, ErrorStack> { ffi::init(); - let bio = unsafe { try!(cvt_p(ffi::BIO_new(ffi::BIO_s_mem()))) }; + let bio = unsafe { cvt_p(ffi::BIO_new(ffi::BIO_s_mem()))? }; Ok(MemBio(bio)) } |