From bb639032859701e69a272f9718c6758d25fdc991 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 16 Mar 2021 22:12:55 +0000 Subject: [PATCH] UnpreparedUpdates: Rename types a bit Signed-off-by: Ian Jackson --- daemon/cmdlistener.rs | 4 ++-- src/updates.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index bb94579e..67ca6fb5 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -232,7 +232,7 @@ fn execute(cs: &mut CommandStream, cmd: MgmtCommand) -> MgmtResponse { type ExecuteGameInsnResults<'igr, 'ig> = ( ExecuteGameChangeUpdates, MgmtGameResponse, - Option, // These happena after everything else + UnpreparedUpdates, // These happena after everything else &'igr mut InstanceGuard<'ig>, ); @@ -620,7 +620,7 @@ fn execute_game_insn<'cs, 'igr, 'ig: 'igr>( Some( Box::new(move |prepub: &mut PrepareUpdatesBuffer| prepub.piece_updates(xupdates)) - as UnpreparedUpdates + as SomeUnpreparedUpdates ), ig_g) }, diff --git a/src/updates.rs b/src/updates.rs index b9bf85d3..3266a70f 100644 --- a/src/updates.rs +++ b/src/updates.rs @@ -17,7 +17,8 @@ pub type RawClientSequence = u64; #[serde(transparent)] pub struct ClientSequence(RawClientSequence); -pub type UnpreparedUpdates = Box< +pub type UnpreparedUpdates = Option; +pub type SomeUnpreparedUpdates = Box< dyn for<'r> FnOnce(&'r mut PrepareUpdatesBuffer) >; -- 2.30.2