diff --git a/src/ship/items/actions.rs b/src/ship/items/actions.rs index c8eb0d1..ee2c64a 100644 --- a/src/ship/items/actions.rs +++ b/src/ship/items/actions.rs @@ -15,7 +15,7 @@ pub enum TriggerCreateItem {ItemAction, fn take_item_from_floor(character_id: CharacterEntityId, item_id: ClientItemId) -> impl for<'a> Fn((ItemStateProxy<'a>, Box), ()) - -> Pin), FloorItem), ItemStateError>> + Send + 'a>> + -> Pin, Box), FloorItem), ItemStateError>> + Send + 'a>> { move |(mut item_state, transaction), _| { Box::pin(async move { @@ -30,7 +30,7 @@ fn take_item_from_floor(character_id: CharacterEntityId, item_id: ClientItemId) fn add_floor_item_to_inventory(character: &CharacterEntity) -> impl for<'a> Fn((ItemStateProxy<'a>, Box), FloorItem) - -> Pin), TriggerCreateItem), ItemStateError>> + Send + 'a>> + -> Pin, Box), TriggerCreateItem), ItemStateError>> + Send + 'a>> { let character = character.clone(); move |(mut item_state, transaction), floor_item| { @@ -96,7 +96,7 @@ where fn take_item_from_inventory(character_id: CharacterEntityId, item_id: ClientItemId) -> impl for<'a> Fn((ItemStateProxy<'a>, Box), ()) - -> Pin), InventoryItem), ItemStateError>> + Send + 'a>> + -> Pin, Box), InventoryItem), ItemStateError>> + Send + 'a>> { move |(mut item_state, mut transaction), _| { Box::pin(async move { @@ -114,7 +114,7 @@ fn take_item_from_inventory(character_id: CharacterEntityId, item_id: ClientItem fn add_inventory_item_to_shared_floor(character_id: CharacterEntityId, item_id: ClientItemId, map_area: MapArea, drop_position: (f32, f32, f32)) -> impl for<'a> Fn((ItemStateProxy<'a>, Box), InventoryItem) - -> Pin), ()), ItemStateError>> + Send + 'a>> + -> Pin, Box), ()), ItemStateError>> + Send + 'a>> { move |(mut item_state, transaction), inventory_item| { Box::pin(async move {