mirror of
https://gitlab.com/artofrev/smallint.git
synced 2024-11-14 17:21:16 -05:00
23 lines
502 B
Rust
23 lines
502 B
Rust
|
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))
|
||
|
}
|
||
|
}
|
||
|
|