From: Ian Jackson Date: Sat, 30 Apr 2022 12:10:38 +0000 (+0100) Subject: currency: Rename value X-Git-Tag: otter-1.1.0~404 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1ea826efc02ec744f21be8d9a1ac6730dada423e;p=otter.git currency: Rename value Having the two pieces here is confusing. All the variables should say which piece they are. Signed-off-by: Ian Jackson --- diff --git a/src/currency.rs b/src/currency.rs index 6efd91aa..4c4704c7 100644 --- 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);