Commit d67b3701 authored by Benno Lossin's avatar Benno Lossin
Browse files

rust: pin-init: add `zeroed()` & `Zeroable::zeroed()` functions

`zeroed()` returns a zeroed out value of a sized type implementing
`Zeroable`.

The function is added as a free standing function, in addition to an
associated function on `Zeroable`, because then it can be marked `const`
(functions in traits can't be const at the moment).

Link: https://github.com/Rust-for-Linux/pin-init/pull/56/commits/809e4ec160579c1601dce5d78b432a5b6c8e4e40
Link: https://lore.kernel.org/all/20250523145125.523275-4-lossin@kernel.org


Signed-off-by: default avatarBenno Lossin <lossin@kernel.org>
parent c47024ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment