Clean_up/upb_push_comment (#27707)

This commit is contained in:
apfitzge 2022-09-12 18:59:41 -05:00 committed by GitHub
parent 8bb0acc4c6
commit 079bf561b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,10 @@ impl UnprocessedPacketBatches {
(num_dropped_packets, num_dropped_tracer_packets)
}
/// Pushes a new `deserialized_packet` into the unprocessed packet batches if it does not already
/// exist.
///
/// Returns and drops the lowest priority packet if the buffer is at capacity.
pub fn push(&mut self, deserialized_packet: DeserializedPacket) -> Option<DeserializedPacket> {
if self
.message_hash_to_transaction