diff options
Diffstat (limited to 'src/playerclass.rs')
-rw-r--r-- | src/playerclass.rs | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/src/playerclass.rs b/src/playerclass.rs index 247e8b1..31a49aa 100644 --- a/src/playerclass.rs +++ b/src/playerclass.rs @@ -67,43 +67,10 @@ impl From<&evtclib::Player> for PlayerClass { impl fmt::Display for PlayerClass { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - use EliteSpec::*; - use Profession::*; - - let name = match *self { - PlayerClass::EliteSpec(elite) => match elite { - Dragonhunter => "Dragonhunter", - Firebrand => "Firebrand", - Berserker => "Berserker", - Spellbreaker => "Spellbreaker", - Herald => "Herald", - Renegade => "Renegade", - Scrapper => "Scrapper", - Holosmith => "Holosmith", - Druid => "Druid", - Soulbeast => "Soulbeast", - Daredevil => "Daredevil", - Deadeye => "Deadeye", - Tempest => "Tempest", - Weaver => "Weaver", - Chronomancer => "Chronomancer", - Mirage => "Mirage", - Reaper => "Reaper", - Scourge => "Scourge", - }, - PlayerClass::Profession(prof) => match prof { - Guardian => "Guardian", - Warrior => "Warrior", - Revenant => "Revenant", - Engineer => "Engineer", - Ranger => "Ranger", - Thief => "Thief", - Elementalist => "Elementalist", - Mesmer => "Mesmer", - Necromancer => "Necromancer", - }, - }; - write!(f, "{}", name) + match *self { + PlayerClass::EliteSpec(elite) => elite.fmt(f), + PlayerClass::Profession(prof) => prof.fmt(f), + } } } |