smallint/src/pretty.rs

20 lines
500 B
Rust
Raw Normal View History

2022-08-05 07:45:20 -04:00
use crate::SmallInt;
use crate::SmallUint;
2022-08-06 16:40:19 -04:00
#[cfg(feature = "num-bigint")]
2022-08-05 07:45:20 -04:00
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))
}
}