diff options
author | Daniel <kingdread@gmx.de> | 2020-04-29 15:49:24 +0200 |
---|---|---|
committer | Daniel <kingdread@gmx.de> | 2020-04-29 15:49:24 +0200 |
commit | 16019515dffe4dd790adc72ed8a8ece8fc54c260 (patch) | |
tree | faea65e5fbbd174d86ff42db4289a1cb7dfd54c9 /src/filters | |
parent | 283a56b3a77cd3eb57afe02874cf463b244503da (diff) | |
download | raidgrep-16019515dffe4dd790adc72ed8a8ece8fc54c260.tar.gz raidgrep-16019515dffe4dd790adc72ed8a8ece8fc54c260.tar.bz2 raidgrep-16019515dffe4dd790adc72ed8a8ece8fc54c260.zip |
update evtclib to 0.2.0
Diffstat (limited to 'src/filters')
-rw-r--r-- | src/filters/log.rs | 2 | ||||
-rw-r--r-- | src/filters/player.rs | 17 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/filters/log.rs b/src/filters/log.rs index 8d4e0b5..6be7acc 100644 --- a/src/filters/log.rs +++ b/src/filters/log.rs @@ -10,7 +10,7 @@ use super::{ use std::collections::HashSet; use evtclib::raw::parser::PartialEvtc; -use evtclib::statistics::gamedata::Boss; +use evtclib::Boss; use chrono::{Datelike, NaiveDateTime}; use num_traits::FromPrimitive as _; diff --git a/src/filters/player.rs b/src/filters/player.rs index 4daeb22..7258bd7 100644 --- a/src/filters/player.rs +++ b/src/filters/player.rs @@ -8,8 +8,10 @@ use super::{ Filter, Inclusion, }; +use std::convert::TryFrom; + use evtclib::raw::parser::PartialEvtc; -use evtclib::{Agent, AgentName}; +use evtclib::{Agent, AgentKind}; use regex::Regex; @@ -31,7 +33,7 @@ impl Filter<PartialEvtc, LogResult> for AllPlayers { continue; } - let agent = Agent::from_raw(agent); + let agent = Agent::try_from(agent); if let Ok(agent) = agent { result = result & self.0.filter_early(&agent); } else { @@ -72,15 +74,10 @@ impl Filter<Agent, Player> for NameFilter { return Inclusion::Unknown; } - if let AgentName::Player { - ref account_name, - ref character_name, - .. - } = agent.name() - { + if let AgentKind::Player(ref player) = agent.kind() { let field = match self.0 { - SearchField::Account => account_name, - SearchField::Character => character_name, + SearchField::Account => player.account_name(), + SearchField::Character => player.character_name(), _ => unreachable!("We already checked for Guild earlier"), }; self.1.is_match(field).into() |