1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-03 18:24:05 +02:00

keep gameevent enum under 128b

This commit is contained in:
Robin Appelman 2019-10-11 23:24:47 +02:00
commit 7ee659a8ed
4 changed files with 1300 additions and 27 deletions

File diff suppressed because it is too large Load diff

View file

@ -190,3 +190,9 @@ pub struct RawGameEvent {
pub trait FromRawGameEvent: Sized {
fn from_raw_event(values: Vec<GameEventValue>) -> Result<Self>;
}
impl<T: FromRawGameEvent> FromRawGameEvent for Box<T> {
fn from_raw_event(values: Vec<GameEventValue>) -> Result<Self> {
Ok(Box::new(T::from_raw_event(values)?))
}
}