From 97b0cf0490ac09c6a5bbe6f66602e6cc62f780aa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 1 May 2022 02:38:13 +0100 Subject: [PATCH] Replace an open-coded into_unprepared call Found this will looking at this code. Signed-off-by: Ian Jackson --- daemon/cmdlistener.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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) }, -- 2.30.2