Skip to content

Commit

Permalink
fix Future::flatten doc
Browse files Browse the repository at this point in the history
`and_then(|x| x)` would be equivalent to `try_flatten`.
`then(|x| x)`is the equivalent to `flatten`.
  • Loading branch information
Speedy37 authored and cramertj committed Nov 4, 2019
1 parent f1029a3 commit 7a74262
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion futures-util/src/future/future/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub trait FutureExt: Future {
/// `IntoFuture` trait and the error can be created from this future's error
/// type.
///
/// This method is roughly equivalent to `self.and_then(|x| x)`.
/// This method is roughly equivalent to `self.then(|x| x)`.
///
/// Note that this function consumes the receiving future and returns a
/// wrapped version of it.
Expand Down

0 comments on commit 7a74262

Please sign in to comment.