Skip to content

Commit 2d5e6dc

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 71805d9 + f3b7a1a commit 2d5e6dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)