Commit af5533d9 authored by Steven Fackler's avatar Steven Fackler
Browse files

Remove Zero and One impls

parent c766f299
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
use libc::{c_int, c_ulong};
use std::{fmt, ptr};
use std::c_str::CString;
use std::num::{One, Zero};

use ffi;
use ssl::error::SslError;
@@ -361,25 +360,6 @@ impl fmt::Show for BigNum {
    }
}

impl One for BigNum {
    fn one() -> BigNum {
        BigNum::new_from(1).unwrap()
    }
}

impl Zero for BigNum {
    fn zero() -> BigNum {
        BigNum::new_from(0).unwrap()
    }

    fn is_zero(&self) -> bool {
        unsafe {
            // It is raw contents of BN_is_zero macro
            (*self.raw()).top == 0
        }
    }
}

impl Eq for BigNum { }
impl PartialEq for BigNum {
    fn eq(&self, oth: &BigNum) -> bool {