From b5bb8de4f2bd18735346a6062a13d95bcf82bdee Mon Sep 17 00:00:00 2001 From: johnthagen Date: Tue, 3 Oct 2017 17:44:02 -0400 Subject: Convert try! usage to ? --- openssl/src/bio.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openssl/src/bio.rs') 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 { 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)) } -- cgit v1.2.3