From: Ian Jackson Date: Tue, 16 Mar 2021 22:12:55 +0000 (+0000) Subject: UnpreparedUpdates: Rename types a bit X-Git-Tag: otter-0.5.0~700 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bb639032859701e69a272f9718c6758d25fdc991;p=otter.git UnpreparedUpdates: Rename types a bit Signed-off-by: Ian Jackson --- 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) >;