aboutsummaryrefslogtreecommitdiff
path: root/src/playerclass.rs
diff options
context:
space:
mode:
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::*;