mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-11-30 04:40:47 +01:00
don't panic on invalid dates
This commit is contained in:
parent
626dedd73b
commit
9ab5d1903f
2 changed files with 15 additions and 11 deletions
|
|
@ -36,7 +36,7 @@ pub trait EventHandler: Default {
|
|||
start_time: &mut Option<NaiveDateTime>,
|
||||
subjects: &mut SubjectMap<Self::PerSubjectData>,
|
||||
) -> Result<(), Error> {
|
||||
let event_time: NaiveDateTime = raw_event.date.try_into().unwrap();
|
||||
let event_time: NaiveDateTime = raw_event.date.try_into()?;
|
||||
let match_time = match start_time {
|
||||
Some(start_time) => (event_time - *start_time).num_seconds() as u32,
|
||||
None => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue