From d59e0691d74c56df54870a1a2c455350ae437cb8 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 21 Jun 2021 02:32:49 +0000 Subject: [PATCH] rustfmt weapon.rs --- src/entity/item/weapon.rs | 63 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/src/entity/item/weapon.rs b/src/entity/item/weapon.rs index d07e34d..9f4ea27 100644 --- a/src/entity/item/weapon.rs +++ b/src/entity/item/weapon.rs @@ -1587,8 +1587,65 @@ impl Weapon { // TODO: invert this? ie: handgun, saber, dagger etc. => false, _ => true? pub fn is_rare_item(self) -> bool { - !matches!(self.weapon, WeaponType::Saber | WeaponType::Brand | WeaponType::Buster | WeaponType::Pallasch | WeaponType::Gladius | WeaponType::Sword | WeaponType::Gigush | WeaponType::Breaker | WeaponType::Claymore | WeaponType::Calibur | WeaponType::Dagger | WeaponType::Knife | WeaponType::Blade | WeaponType::Edge | WeaponType::Ripper | WeaponType::Partisan | WeaponType::Halbert | WeaponType::Glaive | WeaponType::Berdys | WeaponType::Gungnir | WeaponType::Slicer | WeaponType::Spinner | WeaponType::Cutter | WeaponType::Sawcer | WeaponType::Diska | WeaponType::Handgun | WeaponType::Autogun | WeaponType::Lockgun | WeaponType::Railgun | WeaponType::Raygun | WeaponType::Rifle | WeaponType::Sniper | WeaponType::Blaster | WeaponType::Beam | WeaponType::Laser | WeaponType::Mechgun | WeaponType::Assault | WeaponType::Repeater | WeaponType::Gatling | WeaponType::Vulcan | WeaponType::Shot | WeaponType::Spread | WeaponType::Cannon | WeaponType::Launcher | WeaponType::Arms | WeaponType::Cane | WeaponType::Stick | WeaponType::Mace | WeaponType::Club | WeaponType::Rod | WeaponType::Pole | WeaponType::Pillar | WeaponType::Striker | WeaponType::Wand | WeaponType::Staff | WeaponType::Baton | WeaponType::Scepter) + !matches!( + self.weapon, + WeaponType::Saber + | WeaponType::Brand + | WeaponType::Buster + | WeaponType::Pallasch + | WeaponType::Gladius + | WeaponType::Sword + | WeaponType::Gigush + | WeaponType::Breaker + | WeaponType::Claymore + | WeaponType::Calibur + | WeaponType::Dagger + | WeaponType::Knife + | WeaponType::Blade + | WeaponType::Edge + | WeaponType::Ripper + | WeaponType::Partisan + | WeaponType::Halbert + | WeaponType::Glaive + | WeaponType::Berdys + | WeaponType::Gungnir + | WeaponType::Slicer + | WeaponType::Spinner + | WeaponType::Cutter + | WeaponType::Sawcer + | WeaponType::Diska + | WeaponType::Handgun + | WeaponType::Autogun + | WeaponType::Lockgun + | WeaponType::Railgun + | WeaponType::Raygun + | WeaponType::Rifle + | WeaponType::Sniper + | WeaponType::Blaster + | WeaponType::Beam + | WeaponType::Laser + | WeaponType::Mechgun + | WeaponType::Assault + | WeaponType::Repeater + | WeaponType::Gatling + | WeaponType::Vulcan + | WeaponType::Shot + | WeaponType::Spread + | WeaponType::Cannon + | WeaponType::Launcher + | WeaponType::Arms + | WeaponType::Cane + | WeaponType::Stick + | WeaponType::Mace + | WeaponType::Club + | WeaponType::Rod + | WeaponType::Pole + | WeaponType::Pillar + | WeaponType::Striker + | WeaponType::Wand + | WeaponType::Staff + | WeaponType::Baton + | WeaponType::Scepter + ) } } - -