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:
6a8c58f
)
hidden: Make NotchNumber a u32
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 11 Mar 2021 20:06:07 +0000
(20:06 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 11 Mar 2021 21:30:33 +0000
(21:30 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/hidden.rs
patch
|
blob
|
history
diff --git
a/src/hidden.rs
b/src/hidden.rs
index 41cf20808fee5ca629807d4c51c81f6e404679df..f76cd57e8502644733e19c6f338feaea93bacaf5 100644
(file)
--- a/
src/hidden.rs
+++ b/
src/hidden.rs
@@
-189,7
+189,7
@@
mod vpid {
}
}
- pub type NotchNumber = u
size
;
+ pub type NotchNumber = u
32
;
define_index_type!{
pub struct Notch = NotchNumber;
@@
-503,7
+503,7
@@
fn inner(
then {
occultation.views.get_kind(player)
.map_displaced(|area| {
- let x: Coord =
NotchNumber::from(notch
).try_into().unwrap(); // xxx
+ let x: Coord =
notch.index(
).try_into().unwrap(); // xxx
let pos = area.0[0] + PosC([x*2, 0]); // xxx
pos.unwrap()
})