Skip to content

docs: document preferences for Zeroable::zeroed vs pin_init::zeroed#158

Open
nicoan wants to merge 1 commit into
Rust-for-Linux:mainfrom
nicoan:zeroed_docs
Open

docs: document preferences for Zeroable::zeroed vs pin_init::zeroed#158
nicoan wants to merge 1 commit into
Rust-for-Linux:mainfrom
nicoan:zeroed_docs

Conversation

@nicoan

@nicoan nicoan commented Jun 30, 2026

Copy link
Copy Markdown

Modify the comments in pin_init::zeroed and Zeroable::zeroed functions to clarify to the user when one is preferred over the other.

This also adapts the example code in Zeroable::zeroed doc comments to use that function.

Link: https://lore.kernel.org/rust-for-linux/CANiq72m80vip+hz5RngvgH4VxU30amzS-ePr6KVKwKvhf3=Ycg@mail.gmail.com/T/#t
Suggested-by: Miguel Ojeda ojeda@kernel.org

Modify the comments in `pin_init::zeroed` and `Zeroable::zeroed`
functions to clarify to the user when one is preferred over the other.

This also adapts the example code in `Zeroable::zeroed` doc comments to
use that function.

Link: https://lore.kernel.org/rust-for-linux/CANiq72m80vip+hz5RngvgH4VxU30amzS-ePr6KVKwKvhf3=Ycg@mail.gmail.com/T/#t
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Nicolás Antinori <nico.antinori.7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant