chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78879e0
)
fix zcoord debug - make it hex
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 20 Nov 2020 23:46:35 +0000
(23:46 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 20 Nov 2020 23:46:35 +0000
(23:46 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
zcoord/zcoord.rs
patch
|
blob
|
history
diff --git
a/zcoord/zcoord.rs
b/zcoord/zcoord.rs
index 328c6528156594b6acbbe71e0c451bf7b4cab26b..6d63243b7217a9002abda4cb6c58574888233e26 100644
(file)
--- 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<RawLimbVal>);
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)]