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:
b4c71ca
)
slotkey_write
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 27 Jun 2020 12:37:31 +0000
(13:37 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 27 Jun 2020 12:37:31 +0000
(13:37 +0100)
src/gamestate.rs
patch
|
blob
|
history
diff --git
a/src/gamestate.rs
b/src/gamestate.rs
index 8bbc926c46504cbf41b68070cf6511ec9244914d..bf325f7e62a9f0010d6e93c46360fbe4adc6bafc 100644
(file)
--- a/
src/gamestate.rs
+++ b/
src/gamestate.rs
@@
-25,10
+25,8
@@
pub struct PieceRenderInstructions {
pub type VisiblePieceIdSvgIds = &'static [&'static str];
impl Display for VisiblePieceId {
- fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
- let v = self.0.as_ffi();
- write!(f, "{}.{}", v >> 32, v & 0xffffffff)
- }
+ #[throws(fmt::Error)]
+ fn fmt(&self, f : &mut fmt::Formatter) { slotkey_write(self.0,f)? }
}
display_consequential_impls!{VisiblePieceId}