aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-10-04 12:01:06 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-10-04 12:01:06 +0200
commitf480faeefbab83a4396a172a15fce7d264216ef2 (patch)
tree8a5d5fc9b677d15be439f78d6dbe100157fcfb34 /src/lib.rs
parentb6676565c39bb6a2fe8f5f01218fe654ec4d2cb8 (diff)
downloadevtclib-f480faeefbab83a4396a172a15fce7d264216ef2.tar.gz
evtclib-f480faeefbab83a4396a172a15fce7d264216ef2.tar.bz2
evtclib-f480faeefbab83a4396a172a15fce7d264216ef2.zip
add Encounter::from_header_id
It makes sense to expose this logic as a function, as other programs like raidgrep might want to use the same logic when dealing with partial evtc files.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index bb71c77..c950b17 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -88,7 +88,6 @@
//! While there are legitimate use cases for writing/modification support, they are currently not
//! implemented (but might be in a future version).
-use num_traits::FromPrimitive;
use thiserror::Error;
pub mod raw;
@@ -103,7 +102,6 @@ mod processing;
pub use processing::{process, process_file, process_stream, Compression};
pub mod gamedata;
-use gamedata::Boss;
pub use gamedata::{EliteSpec, Encounter, Profession};
pub mod analyzers;
@@ -230,7 +228,7 @@ impl Log {
/// if we know about it in [`Encounter`].
#[inline]
pub fn encounter(&self) -> Option<Encounter> {
- Boss::from_u16(self.boss_id).map(Boss::encounter)
+ Encounter::from_header_id(self.boss_id)
}
/// Return an analyzer suitable to analyze the given log.