From 5b9368f8af5e273aa1e14d7a60ef5931b4221f36 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 30 Apr 2022 00:54:02 +0100 Subject: [PATCH] Have OpOutcomeThunk::Deferrecd take &mut InstanceGuard That way it can call modify_pieces_not_necessarily_saving_aux, which the fastsplit_split implementaion wants. Signed-off-by: Ian Jackson --- daemon/api.rs | 4 ++-- src/updates.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/api.rs b/daemon/api.rs index 4a59b5b6..b9d5636a 100644 --- a/daemon/api.rs +++ b/daemon/api.rs @@ -145,7 +145,7 @@ fn api_piece_op(form: Json>) })().and_then(|(thunk, loose_conflict)| Ok(( match thunk { OpOutcomeThunk::Immediate(r) => r, - OpOutcomeThunk::Reborrow(f) => f(g, player, piece)?, + OpOutcomeThunk::Reborrow(f) => f(&mut ig, player, piece)?, }, loose_conflict ))) { Err(APOE::Inapplicable(poe)) => { @@ -173,7 +173,7 @@ fn api_piece_op(form: Json>) } else { Some((wrc, client, form.cseq)) }; - let mut buf = PrepareUpdatesBuffer::new(g, + let mut buf = PrepareUpdatesBuffer::new(&mut ig, Some(1 + log.len())); buf.piece_update(piece, &by_client, ops); diff --git a/src/updates.rs b/src/updates.rs index 6e7acd3d..db2780af 100644 --- a/src/updates.rs +++ b/src/updates.rs @@ -196,7 +196,7 @@ pub enum OpOutcomeThunk { /// TODO: Provide cooked methods for this (taking `ModifyingPieces`) /// /// TODO: Provide a `ModifyingPieces` to the closure. - Reborrow(Box Result>), } -- 2.30.2