From: Ian Jackson Date: Sat, 21 Nov 2020 12:57:24 +0000 (+0000) Subject: zcoord: final debug X-Git-Tag: otter-0.2.0~437 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9d0ea45f2f3dbb90664e77aed08bace24b4a368f;p=otter.git zcoord: final debug Signed-off-by: Ian Jackson --- 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]