Better Debug for SignedInteger
This commit is contained in:
parent
6ffc34065f
commit
423c9d0bba
|
@ -16,9 +16,15 @@ pub enum SignedIntegerRepr {
|
|||
Big(Box<BigInt>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash)]
|
||||
pub struct SignedInteger(SignedIntegerRepr);
|
||||
|
||||
impl fmt::Debug for SignedInteger {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
write!(f, "{}n", self)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for SignedInteger {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
match self.repr() {
|
||||
|
|
Loading…
Reference in New Issue