Closed
Description
This discussion showed that some people are confused by the use of the .ok().expect()
on Result
values in the documentation. Since Result::expect
is now stable, this pattern has become mostly obsolete (with the exception of Result
types whose error types do not implement Debug
, which shouldn't be very common).
It probably shouldn't be used in the docs any more. Probably the most important place where this should be fixed is https://github.com/rust-lang/rust/blob/6d43fef3aaf64b2e7df14ca676a3a39b723ed7f3/src/doc/trpl/guessing-game.md , which will need to be re-written a bit since the text explicitly references that pattern.
Metadata
Metadata
Assignees
Labels
No labels