aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-10-04 11:48:26 +0200
committerDaniel <kingdread@gmx.de>2020-10-04 11:48:26 +0200
commit5ae375078d981e9efb3ac6ea68572f941fc883cf (patch)
tree6718d823ec6c08a67b665a31fb0ee8396aa651f6 /src/main.rs
parent16a3472627e421488ec461447301a39fcca1d4ef (diff)
downloadraidgrep-5ae375078d981e9efb3ac6ea68572f941fc883cf.tar.gz
raidgrep-5ae375078d981e9efb3ac6ea68572f941fc883cf.tar.bz2
raidgrep-5ae375078d981e9efb3ac6ea68572f941fc883cf.zip
update to newest evtclib
There's a good chance that this will be evtclib 0.5, so we want to adapt our API usage (mainly replacing evtclib::Boss with evtclib::Encounter). The naming is a bit all over the place now, as we sometimes refer to bosses and sometimes to encounters, but I hope to make a sensible decision at *some point* about what we're actually doing here.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index 0ff9e44..9149b17 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,7 +17,7 @@ use structopt::StructOpt;
use walkdir::{DirEntry, WalkDir};
use evtclib::raw::parser::PartialEvtc;
-use evtclib::{Boss, EventKind, Log, Outcome};
+use evtclib::{Encounter, EventKind, Log, Outcome};
mod fexpr;
mod filters;
@@ -172,8 +172,8 @@ pub struct LogResult {
time: DateTime<Utc>,
/// The duration of the fight.
duration: Duration,
- /// The boss.
- boss: Option<Boss>,
+ /// The encounter.
+ encounter: Option<Encounter>,
/// A vector of all participating players.
players: Vec<Player>,
/// The outcome of the fight.
@@ -552,8 +552,8 @@ fn search_file(path: &Path, is_zip: bool, filter: &dyn LogFilter) -> Result<Opti
/// Extract human-readable information from the given log file.
fn extract_info(path: &Path, log: &Log) -> LogResult {
- let boss = log.encounter();
- if boss.is_none() {
+ let encounter = log.encounter();
+ if encounter.is_none() {
debug!(
"log file has unknown boss: {:?} (id: {:#x})",
path,
@@ -579,7 +579,7 @@ fn extract_info(path: &Path, log: &Log) -> LogResult {
log_file: path.to_path_buf(),
time: Utc.timestamp(i64::from(log.local_end_timestamp().unwrap_or(0)), 0),
duration: get_fight_duration(log),
- boss,
+ encounter,
players,
outcome: get_fight_outcome(log),
is_cm: log.is_cm(),