fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
    where
        F: FnOnce(Self::Ok) -> T,
        Self: Sized,
    {
        assert_future::<Result<T, Self::Error>, _>(MapOk::new(self, f))
    }
Maps this future's success value to a different value.

This method can be used to change the [`Ok`](TryFuture::Ok) type of the
future into a different type. It is similar to the [`Result::map`]
method. You can use this method to chain along a computation once the
future has been resolved.

The provided closure `f` will only be called if this future is resolved
to an [`Ok`]. If it resolves to an [`Err`], panics, or is dropped, then
the provided closure will never be invoked.

Note that this method consumes the future it is called on and returns a
wrapped version of it.

# Examples

```
use futures::future::TryFutureExt;

# futures::executor::block_on(async {
let future = async { Ok::<i32, i32>(1) };
let future = future.map_ok(|x| x + 3);
assert_eq!(future.await, Ok(4));
# });
```

Calling [`map_ok`](TryFutureExt::map_ok) on an errored future has no
effect:

```
use futures::future::TryFutureExt;

# futures::executor::block_on(async {
let future = async { Err::<i32, i32>(1) };
let future = future.map_ok(|x| x + 3);
assert_eq!(future.await, Err(1));
# });
```
futures-util/src/future/try_future/mod.rs