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,8 +47,10 @@ impl BigBytes {
self.frozen.push_back(current); self.frozen.push_back(current);
} }
self.frozen_len += bytes.len(); if !bytes.is_empty() {
self.frozen.push_back(bytes); self.frozen_len += bytes.len();
self.frozen.push_back(bytes);
}
} }
// Returns a slice of the frontmost buffer // Returns a slice of the frontmost buffer