Skip to content

Commit f86cd70

Browse files
keep original text for is_ok and is_err
1 parent f8f2330 commit f86cd70

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

library/core/src/result.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,12 @@
256256
//!
257257
//! ## Querying the variant
258258
//!
259-
//! The [`is_ok`] and [`is_err`] methods borrow of the [`Result`]
260-
//! and return [`true`] if the [`Result`] is [`Ok`] or [`Err`], respectively.
259+
//! The [`is_ok`] and [`is_err`] methods return [`true`] if the [`Result`]
260+
//! is [`Ok`] or [`Err`], respectively.
261261
//!
262262
//! The [`is_ok_and`] and [`is_err_and`] methods apply the provided function
263-
//! to the contents of the [`Result`] to produce a boolean value. If this is [`Err`]
264-
//! then a default result is returned instead without executing the function.
263+
//! to the contents of the [`Result`] to produce a boolean value. If the [`Result`]` does not have the expected variant
264+
//! then `false` is returned instead without executing the function.
265265
//!
266266
//! [`is_err`]: Result::is_err
267267
//! [`is_ok`]: Result::is_ok
@@ -347,9 +347,9 @@
347347
//! * [`map`] transforms [`Result<T, E>`] into [`Result<U, E>`] by applying
348348
//! the provided function to the contained value of [`Ok`] and leaving
349349
//! [`Err`] values unchanged
350-
//! * [`inspect`] takes ownership of the [`Result`] and applies the
350+
//! * [`inspect`] takes ownership of the [`Result`], applies the
351351
//! provided function to the contained value by reference,
352-
//! and then the [`Result`] is returned
352+
//! and then returns the [`Result`]
353353
//!
354354
//! [`map`]: Result::map
355355
//! [`inspect`]: Result::inspect
@@ -359,9 +359,9 @@
359359
//! * [`map_err`] transforms [`Result<T, E>`] into [`Result<T, F>`] by
360360
//! applying the provided function to the contained value of [`Err`] and
361361
//! leaving [`Ok`] values unchanged
362-
//! * [`inspect_err`] takes ownership of the [`Result`] and applies the
362+
//! * [`inspect_err`] takes ownership of the [`Result`], applies the
363363
//! provided function to the contained value of [`Err`] by reference,
364-
//! and then the [`Result`] is returned
364+
//! and then returns the [`Result`]
365365
//!
366366
//! [`map_err`]: Result::map_err
367367
//! [`inspect_err`]: Result::inspect_err

0 commit comments

Comments
 (0)