1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-28 01:52:57 +01:00

Don't add empty bytes to queue

This commit is contained in:
asonix 2024-05-19 16:17:44 -05:00
parent 96f5ebb549
commit 8eb1d10bae

View File

@ -47,9 +47,11 @@ impl BigBytes {
self.frozen.push_back(current);
}
if !bytes.is_empty() {
self.frozen_len += bytes.len();
self.frozen.push_back(bytes);
}
}
// Returns a slice of the frontmost buffer
pub(super) fn front_slice(&self) -> &[u8] {