We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e9c93d commit 4411d5fCopy full SHA for 4411d5f
library/core/src/option.rs
@@ -842,6 +842,7 @@ impl<T> Option<T> {
842
/// ```
843
/// let good_year_from_input = "1909";
844
/// let bad_year_from_input = "190blarg";
845
+ /// // Result::ok() converts a Result<T> to an Option<T>
846
/// let good_year = good_year_from_input.parse().ok().unwrap_or_default();
847
/// let bad_year = bad_year_from_input.parse().ok().unwrap_or_default();
848
///
0 commit comments