]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: id_pool: rename IdPool::new() to with_capacity()
authorAlice Ryhl <aliceryhl@google.com>
Tue, 25 Nov 2025 13:59:39 +0000 (13:59 +0000)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Wed, 26 Nov 2025 16:25:35 +0000 (11:25 -0500)
commit6297fb3863d81b0970fd435476b837739c0ea4e7
tree9f3da702df6d8951706d92cb57b820559b9546ac
parentd0cf6512bbcf77afb6102f886fcd7fd48b7ae043
rust: id_pool: rename IdPool::new() to with_capacity()

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@google.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
rust/kernel/id_pool.rs