Re: [PATCH v7 06/10] rust: id_pool: take a NonZero capacity in with_capacity

From: Alice Ryhl

Date: Tue Aug 25 2026 - 08:10:30 EST


On Mon, Aug 17, 2026 at 04:04:20PM +0900, Eliot Courtney wrote:
> There is no good reason to allocate an IdPool with zero capacity.
> Reflect this in IdPool::with_capacity.
>
> Signed-off-by: Eliot Courtney <ecourtney@xxxxxxxxxx>

Why do this? Zero capacity is not an invalid state, so please don't
impose the nz! macro upon users for no reason.

Alice