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

minor cleanup

This commit is contained in:
Robin Appelman 2019-08-12 12:39:50 +02:00
commit e735ab374f
3 changed files with 34 additions and 49 deletions

View file

@ -64,14 +64,14 @@ impl Parse for ParseSendTable {
if prop.flags.contains(SendPropFlag::InsideArray) {
if array_element_prop.is_some() || prop.flags.contains(SendPropFlag::ChangesOften) {
return Err(ParseError::InvalidSendProp(
"Array contents can't have the 'ChangesOften' flag".to_owned(),
"Array contents can't have the 'ChangesOften' flag",
));
}
array_element_prop = Some(prop);
} else if let Some(array_element) = array_element_prop {
if prop.prop_type != SendPropType::Array {
return Err(ParseError::InvalidSendProp(
"Array contents can without array".to_owned(),
"Array contents can without array",
));
}
array_element_prop = None;