fix: resolve clippy warnings (matches!, map_or, redundant guard, unnecessary allocations)

This commit is contained in:
Nikketryhard
2026-02-14 04:06:18 -06:00
parent 725bdb4e9a
commit 901cd3d2e3
7 changed files with 14 additions and 32 deletions

View File

@@ -227,10 +227,7 @@ fn looks_like_valid_message(fields: &[ProtoField], original_len: usize) -> bool
// (e.g., a long string that happened to have a valid first-field prefix)
if fields.len() == 1 && original_len > 100 {
// Single-field messages of >100 bytes are suspicious unless the field is bytes/message
match &fields[0].value {
ProtoValue::Bytes(_) | ProtoValue::Message(_) => true,
_ => false,
}
matches!(&fields[0].value, ProtoValue::Bytes(_) | ProtoValue::Message(_))
} else {
true
}