From 74dc6574650a157ab57779dc633e140d020b792a Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 4 May 2020 15:25:33 +0200 Subject: add -class player filter --- src/playerclass.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/playerclass.rs') diff --git a/src/playerclass.rs b/src/playerclass.rs index 77b9794..247e8b1 100644 --- a/src/playerclass.rs +++ b/src/playerclass.rs @@ -59,6 +59,12 @@ impl From<(Profession, Option)> for PlayerClass { } } +impl From<&evtclib::Player> for PlayerClass { + fn from(player: &evtclib::Player) -> Self { + (player.profession(), player.elite()).into() + } +} + impl fmt::Display for PlayerClass { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { use EliteSpec::*; -- cgit v1.2.3