mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
Fix article in Result.map and Result.map_err documentation
This commit is contained in:
@@ -456,7 +456,7 @@ pub fn as_mut_slice(&mut self) -> &mut [T] {
|
||||
// Transforming contained values
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// Maps a `Result<T, E>` to `Result<U, E>` by applying a function to an
|
||||
/// Maps a `Result<T, E>` to `Result<U, E>` by applying a function to a
|
||||
/// contained `Ok` value, leaving an `Err` value untouched.
|
||||
///
|
||||
/// This function can be used to compose the results of two functions.
|
||||
@@ -484,7 +484,7 @@ pub fn map<U, F: FnOnce(T) -> U>(self, op: F) -> Result<U,E> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Maps a `Result<T, E>` to `Result<T, F>` by applying a function to an
|
||||
/// Maps a `Result<T, E>` to `Result<T, F>` by applying a function to a
|
||||
/// contained `Err` value, leaving an `Ok` value untouched.
|
||||
///
|
||||
/// This function can be used to pass through a successful result while handling
|
||||
|
||||
Reference in New Issue
Block a user