From: Ian Jackson Date: Wed, 28 Apr 2021 23:57:30 +0000 (+0100) Subject: cmdlistener: Introduce InsnExpanded X-Git-Tag: otter-0.6.0~501 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=75d04834bd2b9c0acb28287d577f7642465d51e8;p=otter.git cmdlistener: Introduce InsnExpanded Signed-off-by: Ian Jackson --- diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index 41010c0f..92bc1f6e 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -977,10 +977,12 @@ fn execute_for_game<'cs, 'igr, 'ig: 'igr>( }); st.have_deleted |= was_delete; st.uh.accumulate(ig, updates)?; - if ! expand.is_empty() { + if matches!(&resp, MGR::InsnExpanded) { let mut expand: VecDeque<_> = expand.into(); expand.append(&mut insns); insns = expand; + } else { + assert!(expand.is_empty()) } responses.push(resp); if let Some(unprepared) = unprepared { diff --git a/src/commands.rs b/src/commands.rs index 3da7d81e..92fcdfe9 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -121,6 +121,7 @@ pub enum MgmtGameResponse { Fine, Info(MgmtGameResponseGameInfo), InsnMark(Box<[u8]>), + InsnExpanded, Synch(Generation), InternalPieceId(Option),