aboutsummaryrefslogtreecommitdiffstats
path: root/rust/pin-init/examples/static_init.rs
diff options
context:
space:
mode:
authorBenno Lossin <[email protected]>2025-05-23 14:50:58 +0000
committerBenno Lossin <[email protected]>2025-06-11 19:13:56 +0000
commitc47024ba198b01cab6bb6e3e5a69b73ed2f2aa16 (patch)
tree58bb931785c11e0b13c60f1e6ae8fe729a07f782 /rust/pin-init/examples/static_init.rs
parentrust: pin-init: rename `zeroed` to `init_zeroed` (diff)
downloadkernel-c47024ba198b01cab6bb6e3e5a69b73ed2f2aa16.tar.gz
kernel-c47024ba198b01cab6bb6e3e5a69b73ed2f2aa16.zip
rust: pin-init: add `Zeroable::init_zeroed`
The trait function delegates to the already existing `init_zeroed` function that returns a zeroing initializer for `Self`. The syntax `..Zeroable::init_zeroed()` is already used by the initialization macros to initialize all fields that are not mentioned in the initializer with zero. Therefore it is expected that the function also exists on the trait. Link: https://github.com/Rust-for-Linux/pin-init/pull/56/commits/a424a6c9af5a4418a8e5e986a3db26a4432e2f1a Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Benno Lossin <[email protected]>
Diffstat (limited to 'rust/pin-init/examples/static_init.rs')
0 files changed, 0 insertions, 0 deletions