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:
04a7230
)
currency: Rename value
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 30 Apr 2022 12:10:38 +0000
(13:10 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 30 Apr 2022 14:15:30 +0000
(15:15 +0100)
Having the two pieces here is confusing. All the variables should say
which piece they are.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/currency.rs
patch
|
blob
|
history
diff --git
a/src/currency.rs
b/src/currency.rs
index 6efd91aa825d5949b99db3810f6f79394073da00..4c4704c7927b34f3f18bfd3704497a60e235a2da 100644
(file)
--- a/
src/currency.rs
+++ b/
src/currency.rs
@@
-135,8
+135,8
@@
impl PieceTrait for Banknote {
tgpc: &mut GPiece, tipc: &IPiece,
ngpc: &mut GPiece|
{
- let value: &mut Value = tgpc.xdata.get_mut_exp()?;
- let remaining = value.qty.checked_sub(take)
+ let
tgpc_
value: &mut Value = tgpc.xdata.get_mut_exp()?;
+ let remaining =
tgpc_
value.qty.checked_sub(take)
.ok_or(Ia::CurrencyShortfall)?;
tgpc.held = Some(player);