aboutsummaryrefslogtreecommitdiff
path: root/src/playerclass.rs
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-05-04 15:25:33 +0200
committerDaniel <kingdread@gmx.de>2020-05-04 15:25:33 +0200
commit74dc6574650a157ab57779dc633e140d020b792a (patch)
tree6543a81e0545b9acfeea64a63547c0f7aadf996c /src/playerclass.rs
parent6afe5879579ad39397024fbdbe75ad3207ff50a1 (diff)
downloadraidgrep-74dc6574650a157ab57779dc633e140d020b792a.tar.gz
raidgrep-74dc6574650a157ab57779dc633e140d020b792a.tar.bz2
raidgrep-74dc6574650a157ab57779dc633e140d020b792a.zip
add -class player filter
Diffstat (limited to 'src/playerclass.rs')
-rw-r--r--src/playerclass.rs6
1 files changed, 6 insertions, 0 deletions
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<EliteSpec>)> 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::*;