mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
minor cleanup
This commit is contained in:
parent
e735ab374f
commit
a9c76eb27c
3 changed files with 718 additions and 1070 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -187,7 +187,7 @@ fn parse_string_table_list(
|
||||||
for _ in 0..entry_count {
|
for _ in 0..entry_count {
|
||||||
if !stream.read::<bool>()? {
|
if !stream.read::<bool>()? {
|
||||||
return Err(ParseError::InvalidDemo(
|
return Err(ParseError::InvalidDemo(
|
||||||
"there should be no holes when reading CreateStringTable message".to_string(),
|
"there should be no holes when reading CreateStringTable message",
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ pub enum ParseError {
|
||||||
/// String table that was send for update doesn't exist
|
/// String table that was send for update doesn't exist
|
||||||
StringTableNotFound(u8),
|
StringTableNotFound(u8),
|
||||||
/// A unknown game event type was read
|
/// A unknown game event type was read
|
||||||
UnknownGameEvent(String),
|
UnknownGameEvent(&'static str),
|
||||||
/// A read game event doesn't contain the expected values
|
/// A read game event doesn't contain the expected values
|
||||||
InvalidGameEvent {
|
InvalidGameEvent {
|
||||||
expected_type: GameEventValueType,
|
expected_type: GameEventValueType,
|
||||||
|
|
@ -52,7 +52,7 @@ pub enum ParseError {
|
||||||
size: u32,
|
size: u32,
|
||||||
},
|
},
|
||||||
/// Misc malformed demo error
|
/// Misc malformed demo error
|
||||||
InvalidDemo(String),
|
InvalidDemo(&'static str),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<ReadError> for ParseError {
|
impl From<ReadError> for ParseError {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue