diff options
author | Daniel <kingdread@gmx.de> | 2020-05-01 13:29:38 +0200 |
---|---|---|
committer | Daniel <kingdread@gmx.de> | 2020-05-01 13:29:38 +0200 |
commit | 5f765b749f793b2866262546d28ff138a5654dfc (patch) | |
tree | 192add4f0c51169f8f2702596d05bee00af6561a /src/filters/player.rs | |
parent | 811d7e62695c5c12aecd08b176c4ead641e2ad2c (diff) | |
download | raidgrep-5f765b749f793b2866262546d28ff138a5654dfc.tar.gz raidgrep-5f765b749f793b2866262546d28ff138a5654dfc.tar.bz2 raidgrep-5f765b749f793b2866262546d28ff138a5654dfc.zip |
change LogFilter to take EarlyLogResult
This allows us to attach some additional metadata that is not found in
the PartialEvtc otherwise, such as the file name.
Diffstat (limited to 'src/filters/player.rs')
-rw-r--r-- | src/filters/player.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/filters/player.rs b/src/filters/player.rs index 7258bd7..3af2be2 100644 --- a/src/filters/player.rs +++ b/src/filters/player.rs @@ -3,14 +3,13 @@ //! Additionally, it provides methods to lift a player filter to a log filter with [`any`][any] and //! [`all`][all]. use super::{ - super::{guilds, LogResult, Player, SearchField}, + super::{guilds, EarlyLogResult, LogResult, Player, SearchField}, log::LogFilter, Filter, Inclusion, }; use std::convert::TryFrom; -use evtclib::raw::parser::PartialEvtc; use evtclib::{Agent, AgentKind}; use regex::Regex; @@ -25,10 +24,10 @@ pub trait PlayerFilter = Filter<Agent, Player>; #[derive(Debug)] struct AllPlayers(Box<dyn PlayerFilter>); -impl Filter<PartialEvtc, LogResult> for AllPlayers { - fn filter_early(&self, partial_evtc: &PartialEvtc) -> Inclusion { +impl Filter<EarlyLogResult, LogResult> for AllPlayers { + fn filter_early(&self, early_log: &EarlyLogResult) -> Inclusion { let mut result = Inclusion::Include; - for agent in &partial_evtc.agents { + for agent in &early_log.evtc.agents { if !agent.is_player() { continue; } |