From 5ae375078d981e9efb3ac6ea68572f941fc883cf Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 4 Oct 2020 11:48:26 +0200 Subject: 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. --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main.rs') 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, /// The duration of the fight. duration: Duration, - /// The boss. - boss: Option, + /// The encounter. + encounter: Option, /// A vector of all participating players. players: Vec, /// The outcome of the fight. @@ -552,8 +552,8 @@ fn search_file(path: &Path, is_zip: bool, filter: &dyn LogFilter) -> Result 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(), -- cgit v1.2.3