| Date | Mon, 3 Jul 2023 11:58:14 +0000 | Subject | [PATCH 5/7] rust: init: add `..Zeroable::zeroed()` syntax for zeroing all missing fields | From | Alice Ryhl <> |
| |
Benno Lossin <benno.lossin@proton.me> writes: > Add the struct update syntax to the init macros, but only for > `..Zeroable::zeroed()`. Adding this at the end of the struct initializer > allows one to omit fields from the initializer, these fields will be > initialized with 0x00 set to every byte. Only types that implement the > `Zeroable` trait can utilize this. > > Suggested-by: Asahi Lina <lina@asahilina.net> > Signed-off-by: Benno Lossin <benno.lossin@proton.me>
I'm a bit surprised by how large this change is, but it looks ok.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
|