From 57b4f413d438dc04976fbd26bde8260a333352a4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 16 Mar 2021 21:57:28 +0000 Subject: [PATCH] UnpreparedUpdates: Move and rename (nfc) Signed-off-by: Ian Jackson --- daemon/cmdlistener.rs | 8 +++----- src/updates.rs | 4 ++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index 5a51b7be..d2daf79b 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -227,14 +227,12 @@ fn execute(cs: &mut CommandStream, cmd: MgmtCommand) -> MgmtResponse { // ---------- game command implementations ---------- -type ExecuteGameInsnResultsPrepub = Box< - dyn for<'r> FnOnce(&'r mut PrepareUpdatesBuffer) - >; + type ExecuteGameInsnResults<'igr, 'ig> = ( ExecuteGameChangeUpdates, MgmtGameResponse, - Option, // These happena after everything else + Option, // These happena after everything else &'igr mut InstanceGuard<'ig>, ); @@ -622,7 +620,7 @@ fn execute_game_insn<'cs, 'igr, 'ig: 'igr>( Some( Box::new(move |prepub: &mut PrepareUpdatesBuffer| prepub.piece_updates(xupdates)) - as ExecuteGameInsnResultsPrepub + as UnpreparedUpdates ), ig_g) }, diff --git a/src/updates.rs b/src/updates.rs index 33bf4645..b9bf85d3 100644 --- a/src/updates.rs +++ b/src/updates.rs @@ -17,6 +17,10 @@ pub type RawClientSequence = u64; #[serde(transparent)] pub struct ClientSequence(RawClientSequence); +pub type UnpreparedUpdates = Box< + dyn for<'r> FnOnce(&'r mut PrepareUpdatesBuffer) + >; + // ---------- from manamgenet operations ---------- #[derive(Debug)] // not Default -- 2.30.2