cool I can simplify this now
This commit is contained in:
		
							parent
							
								
									ab031e41a3
								
							
						
					
					
						commit
						69a9824b9c
					
				| @ -80,7 +80,7 @@ pub async fn pick_up_item<EG>( | |||||||
| where | where | ||||||
|     EG: EntityGateway, |     EG: EntityGateway, | ||||||
| { | { | ||||||
|     let result: Result<TriggerCreateItem, ItemStateError> = 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 = ItemStateProxy::new(item_state); | ||||||
|         let ((item_state_proxy, transaction), result) = ItemStateAction::default() |         let ((item_state_proxy, transaction), result) = ItemStateAction::default() | ||||||
|             .act(take_item_from_floor(character.id, *item_id)) |             .act(take_item_from_floor(character.id, *item_id)) | ||||||
| @ -89,8 +89,7 @@ where | |||||||
|             .await?; |             .await?; | ||||||
|         item_state_proxy.commit(); |         item_state_proxy.commit(); | ||||||
|         Ok((transaction, result)) |         Ok((transaction, result)) | ||||||
|     }).await; |     }).await | ||||||
|     result |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| pub async fn drop_item<EG>( | pub async fn drop_item<EG>( | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user