You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Poolable and Realloc trait method implementations for Vec
operate on the vector itself rather than its underlying buffer.
This is why Poolable::capacity() implementation calls Vec::len()
and Realloc::realloc() implementation uses Vec::resize() rather
than Vec::reserve() or Vec::reserve_exact().
However, the condition checking whether the vector should be resized
called Vec::len() rather than Vec::capacity().
Apparently it was an attempt to call Poolable::capacity(&self),
but by default ambiguous call is resolved to Vec::capacity().
The problem is resolved by calling .len() explicitly.
Regression test and assertions failing for byte-pool 0.2.2 are added.
0 commit comments