Loading openssl/src/bn/mod.rs +6 −8 Original line number Diff line number Diff line Loading @@ -102,11 +102,10 @@ impl BigNum { }) } pub fn new_from_ffi(orig: *mut ffi::BIGNUM) -> Result<BigNum, SslError> { pub unsafe fn new_from_ffi(orig: *mut ffi::BIGNUM) -> Result<BigNum, SslError> { if orig.is_null() { panic!("Null Pointer was supplied to BigNum::new_from_ffi"); } unsafe { let r = ffi::BN_dup(orig); if r.is_null() { panic!("Unexpected null pointer from BN_dup(..)") Loading @@ -114,7 +113,6 @@ impl BigNum { Ok(BigNum(r)) } } } pub fn new_from_slice(n: &[u8]) -> Result<BigNum, SslError> { BigNum::new().and_then(|v| unsafe { Loading Loading
openssl/src/bn/mod.rs +6 −8 Original line number Diff line number Diff line Loading @@ -102,11 +102,10 @@ impl BigNum { }) } pub fn new_from_ffi(orig: *mut ffi::BIGNUM) -> Result<BigNum, SslError> { pub unsafe fn new_from_ffi(orig: *mut ffi::BIGNUM) -> Result<BigNum, SslError> { if orig.is_null() { panic!("Null Pointer was supplied to BigNum::new_from_ffi"); } unsafe { let r = ffi::BN_dup(orig); if r.is_null() { panic!("Unexpected null pointer from BN_dup(..)") Loading @@ -114,7 +113,6 @@ impl BigNum { Ok(BigNum(r)) } } } pub fn new_from_slice(n: &[u8]) -> Result<BigNum, SslError> { BigNum::new().and_then(|v| unsafe { Loading