From: Ian Jackson Date: Thu, 1 Apr 2021 10:05:38 +0000 (+0100) Subject: cmd updates: Shuffle some variables X-Git-Tag: otter-0.5.0~335 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=eff09db6a88af8582c2f855150714ad1c566be6b;p=otter.git cmd updates: Shuffle some variables For neatness and clarity. Signed-off-by: Ian Jackson --- 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);