Re: [PATCH v4 12/13] rust: init: add `{pin_}chain` functions to `{Pin}Init<T, E>`

From: Alice Ryhl
Date: Mon Aug 21 2023 - 07:25:08 EST


Benno Lossin <benno.lossin@xxxxxxxxx> writes:
> The `{pin_}chain` functions extend an initializer: it not only
> initializes the value, but also executes a closure taking a reference to
> the initialized value. This allows to do something with a value directly
> after initialization.
>
> Suggested-by: Asahi Lina <lina@xxxxxxxxxxxxx>
> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>
> Signed-off-by: Benno Lossin <benno.lossin@xxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>