Skip to content
Snippets Groups Projects
Unverified Commit 62fd1328 authored by zjb0807's avatar zjb0807 Committed by GitHub
Browse files

fix fixed_u128 fmt (#173)

parent c2b90847
No related branches found
No related tags found
No related merge requests found
...@@ -208,7 +208,8 @@ impl Bounded for FixedU128 { ...@@ -208,7 +208,8 @@ impl Bounded for FixedU128 {
impl fmt::Debug for FixedU128 { impl fmt::Debug for FixedU128 {
#[cfg(feature = "std")] #[cfg(feature = "std")]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "FixedU128({},{})", self.0 / DIV, (self.0 % DIV) / 1000) let fractional = format!("{:0>18}", self.0 % DIV);
write!(f, "FixedU128({}.{})", self.0 / DIV, fractional)
} }
#[cfg(not(feature = "std"))] #[cfg(not(feature = "std"))]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment