fix: resolve clippy warnings (matches!, map_or, redundant guard, unnecessary allocations)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user