From 75d04834bd2b9c0acb28287d577f7642465d51e8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 29 Apr 2021 00:57:30 +0100 Subject: [PATCH] cmdlistener: Introduce InsnExpanded Signed-off-by: Ian Jackson --- daemon/cmdlistener.rs | 4 +++- src/commands.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) 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), -- 2.30.2