mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-06-03 18:24:09 +02:00
raw events
This commit is contained in:
parent
b9ea35c937
commit
484fd735d1
2 changed files with 9 additions and 5 deletions
|
|
@ -58,6 +58,10 @@ pub fn parse(
|
|||
parse_with_handler::<LogHandler>(log)
|
||||
}
|
||||
|
||||
pub fn raw_events<'a>(log: &'a str) -> impl Iterator<Item = Result<RawEvent<'a>>> + 'a {
|
||||
LineSplit::new(log).map(RawEvent::parse)
|
||||
}
|
||||
|
||||
pub fn parse_with_handler<Handler: EventHandler>(
|
||||
log: &str,
|
||||
) -> Result<
|
||||
|
|
@ -67,7 +71,7 @@ pub fn parse_with_handler<Handler: EventHandler>(
|
|||
),
|
||||
Error,
|
||||
> {
|
||||
let events = LineSplit::new(log).map(RawEvent::parse);
|
||||
let events = raw_events(log);
|
||||
|
||||
let mut handler = Handler::default();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue