mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-04 02:24:12 +02:00
format
This commit is contained in:
parent
8183ac5b65
commit
f2650dc32f
19 changed files with 3614 additions and 2210 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use bitstream_reader::BitRead;
|
||||
use std::collections::HashMap;
|
||||
use bitstream_reader::{BitRead};
|
||||
|
||||
use crate::{ParseError, Result};
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ impl FromGameEventValue for String {
|
|||
_ => Err(ParseError::InvalidGameEvent {
|
||||
name: name.to_string(),
|
||||
value,
|
||||
})
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ impl FromGameEventValue for f32 {
|
|||
_ => Err(ParseError::InvalidGameEvent {
|
||||
name: name.to_string(),
|
||||
value,
|
||||
})
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ impl FromGameEventValue for u32 {
|
|||
_ => Err(ParseError::InvalidGameEvent {
|
||||
name: name.to_string(),
|
||||
value,
|
||||
})
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ impl FromGameEventValue for u16 {
|
|||
_ => Err(ParseError::InvalidGameEvent {
|
||||
name: name.to_string(),
|
||||
value,
|
||||
})
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ impl FromGameEventValue for u8 {
|
|||
_ => Err(ParseError::InvalidGameEvent {
|
||||
name: name.to_string(),
|
||||
value,
|
||||
})
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ impl FromGameEventValue for bool {
|
|||
_ => Err(ParseError::InvalidGameEvent {
|
||||
name: name.to_string(),
|
||||
value,
|
||||
})
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -125,7 +125,7 @@ impl FromGameEventValue for () {
|
|||
_ => Err(ParseError::InvalidGameEvent {
|
||||
name: name.to_string(),
|
||||
value,
|
||||
})
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -138,4 +138,4 @@ pub struct RawGameEvent {
|
|||
|
||||
pub trait FromRawGameEvent: Sized {
|
||||
fn from_raw_event(values: Vec<GameEventValue>) -> Result<Self>;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue