From 9c95bd8295678150c11379508338638a222d24e2 Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 27 Apr 2022 23:57:43 -0600 Subject: [PATCH] cool I can simplify this now --- src/ship/items/actions.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ship/items/actions.rs b/src/ship/items/actions.rs index 4f2fdad..8675b9b 100644 --- a/src/ship/items/actions.rs +++ b/src/ship/items/actions.rs @@ -80,7 +80,7 @@ pub async fn pick_up_item( where EG: EntityGateway, { - let result: Result = entity_gateway.with_transaction(|transaction| async move { + entity_gateway.with_transaction(|transaction| async move { let item_state_proxy = ItemStateProxy::new(item_state); let ((item_state_proxy, transaction), result) = ItemStateAction::default() .act(take_item_from_floor(character.id, *item_id)) @@ -89,8 +89,7 @@ where .await?; item_state_proxy.commit(); Ok((transaction, result)) - }).await; - result + }).await } pub async fn drop_item(