From 9d0ea45f2f3dbb90664e77aed08bace24b4a368f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 21 Nov 2020 12:57:24 +0000 Subject: [PATCH] zcoord: final debug Signed-off-by: Ian Jackson --- zcoord/zcoord.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zcoord/zcoord.rs b/zcoord/zcoord.rs index 301782e3..28d18236 100644 --- a/zcoord/zcoord.rs +++ b/zcoord/zcoord.rs @@ -158,7 +158,7 @@ impl Display for LimbVal { let mut buf = [0u8; DIGITS_PER_LIMB]; let lhs : RawLimbVal = self.to_str_buf(&mut buf).primitive(); if lhs != 0 { - write!(f, "{:#x?}!", lhs)?; + write!(f, "{:#x?}_!_", lhs)?; } write!(f, "{}", str::from_utf8(&buf).unwrap())?; } @@ -789,7 +789,8 @@ mod test { assert_eq!( &format!("{:?}", &l), &dbg ); } chk(0x42, "0000000022"); - chk(0x42 + RAW_LIMB_MODULUS * 0x33, "0x33!0000000022"); + chk(0x42 + RAW_LIMB_MODULUS * 0x33, "0x33_!_0000000022"); + chk(0x42 + RAW_LIMB_MODULUS * 0x3fae, "0x3fae_!_0000000022"); } #[test] -- 2.30.2