mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-04 02:24:12 +02:00
clippy fixes
This commit is contained in:
parent
71f85bfe45
commit
5573ec5db2
8 changed files with 42 additions and 58 deletions
|
|
@ -48,7 +48,7 @@ impl<'a> Parse<'a> for CreateStringTableMessage<'a> {
|
|||
let decompressed_size: u32 = table_data.read()?;
|
||||
let compressed_size: u32 = table_data.read()?;
|
||||
|
||||
if compressed_size < 4 || compressed_size > 10 * 1024 * 1024 {
|
||||
if !(4..=10 * 1024 * 1024).contains(&compressed_size) {
|
||||
return Err(ParseError::InvalidDemo(
|
||||
"Invalid compressed string table size",
|
||||
));
|
||||
|
|
@ -145,7 +145,7 @@ impl<'a> Parse<'a> for UpdateStringTableMessage<'a> {
|
|||
None => return Err(ParseError::StringTableNotFound(table_id)),
|
||||
}?;
|
||||
|
||||
Ok(UpdateStringTableMessage { table_id, entries })
|
||||
Ok(UpdateStringTableMessage { entries, table_id })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue