Re: [PATCH v3 0/4] Replace unwraps in doctests with graceful handling

Miguel Ojeda
2025-01-13T14:42:45Z

On Sat, Nov 23, 2024 at 10:50 AM Daniel Sedlak <daniel@sedlak.dev> wrote:
>
> In the following patches, I touch on error handling in the documentation
> tests/examples. There are multiple occurrences of unwraps which can be
> replaced by a question mark operator which should simplify the code.
> Also, people typically tend to copy & paste code from the examples
> (citation needed). If we leave the unwraps there, I think we can convey
> the wrong impression, that it is OK to use unwraps unless the programmer
> has a really good reason to use them.

Applied to `rust-next` -- thanks everyone!

[ Slightly reworded commit. - Miguel ]

[ Fixed typo in SoB. Slightly reworded commit. - Miguel ]

[ Reworded commit slightly. - Miguel ]

Daniel: in the third patch, there was a broken Signed-off tag (with a
"proper" SoB in the same line) -- I fixed it as mentioned above, but
if you didn't intend to sign off the patch, please let me know,
thanks!

Cheers,
Miguel