From 1eff61629a8f0a732c2f3ecb4df40f3e377e5f34 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 21 Jun 2021 18:32:02 +0000 Subject: [PATCH] andy vs. clippy round 2 --- src/ship/items/inventory.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ship/items/inventory.rs b/src/ship/items/inventory.rs index 4ff2992..dac1ef9 100644 --- a/src/ship/items/inventory.rs +++ b/src/ship/items/inventory.rs @@ -256,10 +256,8 @@ impl InventoryItem { Some((ArmorShopItem::unit_from_item(u).price() / 8) as u32) }, ItemDetail::Tool(t) => { - if !matches!(t.tool, ToolType::PhotonDrop | ToolType::PhotonSphere | ToolType::PhotonCrystal) { - if t.is_rare_item() { - return Some(10u32) - } + if !matches!(t.tool, ToolType::PhotonDrop | ToolType::PhotonSphere | ToolType::PhotonCrystal) && t.is_rare_item() { + return Some(10u32) } Some((ToolShopItem::tool_from_item(t).price() / 8) as u32) },