From fe25cc6210968a8e049b98d5cddb6f70b3cfff8a Mon Sep 17 00:00:00 2001 From: The Dax Date: Fri, 4 Jul 2025 10:30:04 -0400 Subject: [PATCH] Address three of "warning: casting to the same type is unnecessary (`u32` -> `u32`)" --- src/bin/kawari-world.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/kawari-world.rs b/src/bin/kawari-world.rs index ddbbd45..414b853 100644 --- a/src/bin/kawari-world.rs +++ b/src/bin/kawari-world.rs @@ -805,10 +805,10 @@ async fn client_loop( } if let Some(item_info) = result { - if connection.player_data.inventory.currency.gil.quantity >= item_info.price_mid as u32 { + if connection.player_data.inventory.currency.gil.quantity >= item_info.price_mid { // TODO: send the proper response packets! - connection.player_data.inventory.currency.gil.quantity -= item_info.price_mid as u32; - connection.player_data.inventory.add_in_next_free_slot(Item::new(1, item_info.id as u32)); + connection.player_data.inventory.currency.gil.quantity -= item_info.price_mid; + connection.player_data.inventory.add_in_next_free_slot(Item::new(1, item_info.id)); connection.send_inventory(false).await; // TODO: send an actual system notice, this is just a placeholder to provide feedback that the player actually bought something. connection.send_message(&format!("You obtained one or more items: {} (id: {})!", item_info.name, item_info.id)).await;