Re: [PATCH v3 1/4] rust: kernel: init: replace unwraps with the question mark operators

Alice Ryhl
2024-11-25T09:04:28Z

On Sat, Nov 23, 2024 at 10:50 AM Daniel Sedlak <daniel@sedlak.dev> wrote:
>
> Use `?` operator in the doctest. Since it is in the examples,
> using unwraps can convey a wrong impression that unwrapping is
> safe behavior, thus this patch removes this unwrapping.
>
> Link: https://lore.kernel.org/rust-for-linux/CANiq72nsK1D4NuQ1U7NqMWoYjXkqQSj4QuUEL98OmFbq022Z9A@mail.gmail.com/
> Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> Signed-off-by: Daniel Sedlak <daniel@sedlak.dev>