Skip to content

Commit f3b7a1a

Browse files
committed
Update documentation for Result::ok()
The term of "discard" is misleading. An error is not discarded but converted to an `Option::None`.
1 parent 57d2fb1 commit f3b7a1a

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)