From eff09db6a88af8582c2f855150714ad1c566be6b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 1 Apr 2021 11:05:38 +0100 Subject: [PATCH] cmd updates: Shuffle some variables For neatness and clarity. Signed-off-by: Ian Jackson --- daemon/cmdlistener.rs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index 926cfe6c..349ef0c3 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -845,14 +845,6 @@ fn execute_for_game<'cs, 'igr, 'ig: 'igr>( let (ok, uu) = ToRecalculate::with(|mut to_permute| { let r = (||{ - let mut responses = Vec::with_capacity(insns.len()); - struct St { - uh: UpdateHandler, - auth: Authorisation, - have_deleted: bool, - } - let mut uh_auth: Option = None; - let mk_uh = || UpdateHandler::from_how(how); let who = if_chain! { let account = &cs.current_account()?.notional_account; let ig = igu.by_ref(Authorisation::authorise_any()); @@ -867,6 +859,17 @@ fn execute_for_game<'cs, 'igr, 'ig: 'igr>( else { hformat!("[{}]", account) } }; + + let mut responses = Vec::with_capacity(insns.len()); + + struct St { + uh: UpdateHandler, + auth: Authorisation, + have_deleted: bool, + } + let mut uh_auth: Option = None; + + let mk_uh = || UpdateHandler::from_how(how); let res = (||{ for insn in insns.drain(0..) { trace_dbg!("exeucting game insns", insn); -- 2.30.2