Add Debug impl for EcKey

This commit is contained in:
Leo 2019-06-10 21:57:10 +08:00
parent 179758010a
commit d2e48e8d1f
1 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,7 @@
use ffi; use ffi;
use foreign_types::{ForeignType, ForeignTypeRef}; use foreign_types::{ForeignType, ForeignTypeRef};
use libc::c_int; use libc::c_int;
use std::fmt;
use std::ptr; use std::ptr;
use bn::{BigNumContextRef, BigNumRef}; use bn::{BigNumContextRef, BigNumRef};
@ -825,6 +826,12 @@ impl<T> Clone for EcKey<T> {
} }
} }
impl<T> fmt::Debug for EcKey<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "EcKey")
}
}
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use hex::FromHex; use hex::FromHex;