Skip to content

Commit a13e145

Browse files
Rollup merge of rust-lang#151974 - clundin55:doc-fix, r=jhpratt
Update documentation for `Result::ok()` The term of "discard" is misleading. An error is not discarded but converted to an `Option::None`.
2 parents b05a0f6 + f3b7a1a commit a13e145

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

library/core/src/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ impl<T, E> Result<T, E> {
690690
/// Converts from `Result<T, E>` to [`Option<T>`].
691691
///
692692
/// Converts `self` into an [`Option<T>`], consuming `self`,
693-
/// and discarding the error, if any.
693+
/// and converting the error to `None`, if any.
694694
///
695695
/// # Examples
696696
///

0 commit comments

Comments
 (0)