Skip to content

Commit

Permalink
Update option.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
gimbling-away authored Sep 25, 2022
1 parent 8e9c93d commit 4411d5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ impl<T> Option<T> {
/// ```
/// let good_year_from_input = "1909";
/// let bad_year_from_input = "190blarg";
/// // Result::ok() converts a Result<T> to an Option<T>
/// let good_year = good_year_from_input.parse().ok().unwrap_or_default();
/// let bad_year = bad_year_from_input.parse().ok().unwrap_or_default();
///
Expand Down

0 comments on commit 4411d5f

Please sign in to comment.