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

Alice Ryhl <[email protected]>
Newsgroups org.kernel.vger.rust-for-linux,dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.