diff options
author | Benno Lossin <benno.lossin@proton.me> | 2023-08-14 11:47:48 +0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2023-08-21 15:31:49 +0300 |
commit | 7f8977a7fe6df9cdfe489c641058ca5534ec73eb (patch) | |
tree | df8a424a9413189899c2033199ad86918a4d54b2 /rust/.gitignore | |
parent | 1a8076ac6d83825bedb2050e67db0f2635acbb09 (diff) | |
download | linux-7f8977a7fe6df9cdfe489c641058ca5534ec73eb.tar.xz |
rust: init: add `{pin_}chain` functions to `{Pin}Init<T, E>`
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@asahilina.net>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20230814084602.25699-13-benno.lossin@proton.me
[ Cleaned a few trivial nits. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/.gitignore')
0 files changed, 0 insertions, 0 deletions