Re: [PATCH v4 1/2] rust: add basic Pin<Vec<T, A>> abstractions
From: Benno Lossin
Date: Mon Oct 13 2025 - 05:39:41 EST
On Mon Oct 13, 2025 at 11:22 AM CEST, Alice Ryhl wrote:
> On Mon, Oct 13, 2025 at 10:03:19AM +0200, Benno Lossin wrote:
>> And `Vec::pin_init_slice` would have the following signature:
>>
>> fn pin_init_slice<T, I, E>(this: Vec<I>, flags: alloc::Flags) -> Result<Pin<Box<[T]>>>
>> where
>> I: PinInit<T, E>,
>> Error: From<E>;
>
> We already have Box::pin_slice().
Oh that's perfect :) I still think that the helper vec function above
would be useful, if we want to use this pattern (collecting initializers
in a vec) more broadly.
---
Cheers,
Benno