mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-11-30 04:40:47 +01:00
fixes
This commit is contained in:
parent
8d17b30682
commit
95119b9347
13 changed files with 157 additions and 161 deletions
|
|
@ -2,7 +2,6 @@ mod game;
|
|||
mod medic;
|
||||
mod player;
|
||||
|
||||
use crate::event::game::{RoundLengthEvent, RoundWinEvent};
|
||||
use crate::parsing::{skip, skip_matches, split_once, split_subject_end};
|
||||
use crate::raw_event::{against_subject_parser, RawSubject};
|
||||
use crate::{Error, Events, IResult, RawEvent, RawEventType, Result, SubjectId};
|
||||
|
|
@ -29,7 +28,7 @@ trait GameEventErrTrait<T> {
|
|||
fn with_raw(self, raw: &RawEvent) -> Result<T, GameEventError>;
|
||||
}
|
||||
|
||||
impl<'a, T> GameEventErrTrait<T> for Result<T> {
|
||||
impl<T> GameEventErrTrait<T> for Result<T> {
|
||||
fn with_raw(self, raw: &RawEvent) -> Result<T, GameEventError> {
|
||||
self.map_err(|err| GameEventError::Error {
|
||||
err: Box::new(err),
|
||||
|
|
@ -275,7 +274,7 @@ impl<'a, T: EventField<'a>> EventField<'a> for (T, T, T) {
|
|||
|
||||
impl<'a> EventField<'a> for Option<NonZeroU32> {
|
||||
fn parse_field(input: &'a str) -> Result<Self> {
|
||||
u32::parse_field(input).map(|int| NonZeroU32::new(int))
|
||||
u32::parse_field(input).map(NonZeroU32::new)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue