Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In ready_chunks, reserve capacity based on size_hint
Reserving `ready_chunks` limit every time may be too expensive when the limit is high but only a few number of messages available. Now rely on `Stream::size_hint` to reserve the capacity. If underlying stream implements `size_hint`, this will work great. Otherwise `ready_chunk` will be somewhat less efficient. This is better alternative to #2657
- Loading branch information