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

clippy fixes

This commit is contained in:
Robin Appelman 2025-07-13 23:18:50 +02:00
commit f7190dca0f
13 changed files with 23 additions and 25 deletions

View file

@ -157,7 +157,7 @@ impl fmt::Display for PacketEntity {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
writeln!(f, "{}({}) {{", self.entity_index, self.server_class)?;
for child in self.props.iter() {
writeln!(f, "\t{}", child)?;
writeln!(f, "\t{child}")?;
}
write!(f, "}}")
}

View file

@ -365,7 +365,7 @@ impl PlayerSummaryAnalyzer {
..
}) = packet.get_prop_by_name(
"m_iUserID",
format!("{:0>3}", i).as_str(),
format!("{i:0>3}").as_str(),
parser_state,
) {
let entity_id = EntityId::from(i as u32);

View file

@ -355,7 +355,7 @@ impl fmt::Display for SendPropFlags {
.skip_while(|c| *c != '[')
.take_while(|c| *c != ')')
.collect();
write!(f, "{}", flags)
write!(f, "{flags}")
}
}
@ -632,7 +632,7 @@ impl fmt::Display for SendPropValue {
SendPropValue::Array(array) => {
write!(f, "[")?;
for child in array {
write!(f, "{}", child)?;
write!(f, "{child}")?;
}
write!(f, "]")
}
@ -1169,7 +1169,7 @@ impl From<SendPropIdentifier> for u64 {
impl Display for SendPropIdentifier {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match get_prop_names(*self) {
Some((table, prop)) => write!(f, "{}.{}", table, prop),
Some((table, prop)) => write!(f, "{table}.{prop}"),
None => write!(f, "Prop name {} not known", self.0),
}
}