From 1ea826efc02ec744f21be8d9a1ac6730dada423e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 30 Apr 2022 13:10:38 +0100 Subject: [PATCH] currency: Rename value Having the two pieces here is confusing. All the variables should say which piece they are. Signed-off-by: Ian Jackson --- src/currency.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.30.2