mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-15 00:00:18 +02:00
Remove redundant reserve call (#674)
This commit is contained in:
@@ -1283,9 +1283,7 @@ impl Extend<u8> for BytesMut {
|
||||
|
||||
// TODO: optimize
|
||||
// 1. If self.kind() == KIND_VEC, use Vec::extend
|
||||
// 2. Make `reserve` inline-able
|
||||
for b in iter {
|
||||
self.reserve(1);
|
||||
self.put_u8(b);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user