smallint/src/pretty.rs

23 lines
502 B
Rust
Raw Normal View History

2022-08-05 07:45:20 -04:00
use crate::SmallInt;
use crate::SmallUint;
#[cfg(feature= "num-bigint")]
use num_bigint::{BigInt, BigUint};
#[cfg(feature = "num-bigint")]
impl core::fmt::Debug for SmallInt {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", BigInt::from(self))
}
}
#[cfg(feature = "num-bigint")]
impl core::fmt::Debug for SmallUint {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", BigUint::from(self))
}
}