diff options
| author | johnthagen <[email protected]> | 2017-10-03 17:44:02 -0400 |
|---|---|---|
| committer | johnthagen <[email protected]> | 2017-10-03 17:44:02 -0400 |
| commit | b5bb8de4f2bd18735346a6062a13d95bcf82bdee (patch) | |
| tree | 11a6f6d11bc412fc89a4bfb3517ced56bf047012 /openssl/src/bio.rs | |
| parent | Merge pull request #743 from AndyGauge/doc-asn1 (diff) | |
| download | rust-openssl-b5bb8de4f2bd18735346a6062a13d95bcf82bdee.tar.xz rust-openssl-b5bb8de4f2bd18735346a6062a13d95bcf82bdee.zip | |
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)) } |