Re: [PATCH v7 06/10] rust: id_pool: take a NonZero capacity in with_capacity
Alice Ryhl <[email protected]>
| Newsgroups | dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> Why do this? Zero capacity is not an invalid state, so please don't impose the nz! macro upon users for no reason. Alice