From 62fd1328641fa8fda1ed465eb23273e9eed53483 Mon Sep 17 00:00:00 2001
From: zjb0807 <zjb0807@qq.com>
Date: Tue, 19 May 2020 13:16:11 +0800
Subject: [PATCH] fix fixed_u128 fmt (#173)

---
 utilities/src/fixed_u128.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/utilities/src/fixed_u128.rs b/utilities/src/fixed_u128.rs
index 9e39083..5146ed0 100644
--- a/utilities/src/fixed_u128.rs
+++ b/utilities/src/fixed_u128.rs
@@ -208,7 +208,8 @@ impl Bounded for FixedU128 {
 impl fmt::Debug for FixedU128 {
 	#[cfg(feature = "std")]
 	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"))]
-- 
GitLab