Commit 1eb79df2 authored by Michael Gehring's avatar Michael Gehring
Browse files

fail! -> panic!

parent 6277635e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -483,7 +483,7 @@ pub mod unchecked {
            unsafe {
                let r = ffi::BN_dup(self.raw());
                if r.is_null() {
                    fail!("Unexpected null pointer from BN_dup(..)")
                    panic!("Unexpected null pointer from BN_dup(..)")
                } else {
                    BigNum(r)
                }
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ use ffi;
///
/// # Failure
///
/// This function will fail the current task if `a` and `b` do not have the same
/// This function will panic the current task if `a` and `b` do not have the same
/// length.
pub fn eq(a: &[u8], b: &[u8]) -> bool {
    assert!(a.len() == b.len());
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ pub fn pbkdf2_hmac_sha1(pass: &str, salt: &[u8], iter: uint, keylen: uint) -> Ve
                iter as c_int, keylen as c_int,
                out.as_mut_ptr());

        if r != 1 { fail!(); }
        if r != 1 { panic!(); }

        out.set_len(keylen);

+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ pub fn rand_bytes(len: uint) -> Vec<u8> {

        ffi::init();
        let r = ffi::RAND_bytes(out.as_mut_ptr(), len as c_int);
        if r != 1 as c_int { fail!() }
        if r != 1 as c_int { panic!() }

        out.set_len(len);

+1 −1
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ mod tests {
                println!("Lengths differ: {} in computed vs {} expected",
                         computed.len(), expected.len());
            }
            fail!("test failure");
            panic!("test failure");
        }
    }

Loading