From df95131a7d87dc8d0b0bbdca267458025d5eb494 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 20 Nov 2020 23:46:35 +0000 Subject: [PATCH] fix zcoord debug - make it hex Signed-off-by: Ian Jackson --- zcoord/zcoord.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zcoord/zcoord.rs b/zcoord/zcoord.rs index 328c6528..6d63243b 100644 --- a/zcoord/zcoord.rs +++ b/zcoord/zcoord.rs @@ -88,7 +88,6 @@ const DIGITS_PER_LIMB : usize = 10; type RawLimbVal = u64; #[derive(Copy,Clone,Eq,PartialEq,Ord,PartialOrd)] #[derive(Neg,Add,BitAnd,Sub,Shr,ShrAssign)] -#[derive(Debug)] pub struct LimbVal (Wrapping); const DELTA : LimbVal = lv(0x4000_0000); @@ -141,6 +140,12 @@ impl LimbVal { fn primitive(self) -> RawLimbVal { self.0.0 } } +impl Debug for LimbVal { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(),fmt::Error> { + write!(f, "{:x?}", self) + } +} + //---------- Mutabel ---------- #[derive(Clone,Debug)] -- 2.30.2