Re: [PATCH v3 0/4] rust: alloc: add Vec shrinking methods
From: Danilo Krummrich
Date: Wed Feb 11 2026 - 03:57:29 EST
On Wed Feb 11, 2026 at 9:41 AM CET, Shivam Kalra wrote:
> Thanks Alice. I'll go with the standalone helper function approach
> with separate impl blocks for Vec<T, Vmalloc> and Vec<T, KVmalloc>.
If it's only needed for KVmalloc, which apparently is the case, let's just add
it for KVVec only.
Also, please make sure to add a TODO comment mentioning why this workaround
exists and what it should be replaced with, i.e. a generic shrink_to() that
calls into A::realloc().