Re: [PATCH v5 3/6] rust: bitmap: rename IdPool::new() to with_capacity()

From: Alice Ryhl

Date: Wed Nov 12 2025 - 07:55:24 EST


On Wed, Nov 12, 2025 at 12:47:21PM +0000, Alice Ryhl wrote:
> We want to change ::new() to take no parameters and produce a pool that
> is as large as possible while also being inline because that is the
> constructor that Rust Binder actually needs.
>
> However, to avoid complications in examples, we still need the current
> constructor. So rename it to with_capacity(), which is the idiomatic
> Rust name for this kind constructor.
>
> Reviewed-by: Burak Emir <bqe@xxxxxxxxxx>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

> - let num_ids = usize::max(num_ids, BitmapVec::MAX_INLINE_LEN);
> + let num_ids = usize::max(num_ids, BITS_PER_LONG);

Ah ... I messed up the rebase here.

Alice