From: Ian Jackson Date: Sun, 1 May 2022 01:38:13 +0000 (+0100) Subject: Replace an open-coded into_unprepared call X-Git-Tag: otter-1.1.0~381 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=97b0cf0490ac09c6a5bbe6f66602e6cc62f780aa;p=otter.git Replace an open-coded into_unprepared call Found this will looking at this code. Signed-off-by: Ian Jackson --- diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index e1fb0b12..6745b260 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -1058,13 +1058,7 @@ fn execute_game_insn<'cs, 'igr, 'ig: 'igr>( }], raw: None }, Fine, - if xupdates.len() != 0 { - vec![ - Box::new(move |prepub: &mut PrepareUpdatesBuffer| - prepub.piece_updates(xupdates, &None)) - as SomeUnpreparedUpdates - ] - } else { default() }, + xupdates.into_unprepared(None), vec![], ig_g) },