@@ -9,13 +9,9 @@ use futures_sink::Sink;
99#[ cfg( feature = "compat" ) ] use crate :: compat:: Compat ;
1010
1111/* TODO
12- mod join;
1312mod select;
14- pub use self::join::{Join, Join3, Join4, Join5};
1513pub use self::select::Select;
1614
17- #[cfg(feature = "std")]
18- mod join_all;
1915#[cfg(feature = "std")]
2016mod select_all;
2117#[cfg(feature = "std")]
@@ -366,88 +362,6 @@ pub trait TryFutureExt: TryFuture {
366362 {
367363 select::new(self, other.into_future())
368364 }
369-
370- /// Joins the result of two futures, waiting for them both to complete.
371- ///
372- /// This function will return a new future which awaits both this and the
373- /// `other` future to complete. The returned future will finish with a tuple
374- /// of both results.
375- ///
376- /// Both futures must have the same error type, and if either finishes with
377- /// an error then the other will be dropped and that error will be
378- /// returned.
379- ///
380- /// Note that this method consumes the future it is called on and returns a
381- /// wrapped version of it.
382- ///
383- /// # Examples
384- ///
385- /// ```
386- /// use futures::future;
387- /// use futures::executor::block_on;
388- ///
389- /// let a = future::ok::<i32, i32>(1);
390- /// let b = future::ok::<i32, i32>(2);
391- /// let pair = a.join(b);
392- ///
393- /// assert_eq!(block_on(pair), Ok((1, 2)));
394- /// # }
395- /// ```
396- ///
397- /// If one or both of the joined `Future`s is errored, the resulting
398- /// `Future` will be errored:
399- ///
400- /// ```
401- /// use futures::executor::block_on;
402- /// use futures::future::{self, FutureExt};
403- ///
404- /// let a = future::ok::<i32, i32>(1);
405- /// let b = future::err::<i32, i32>(2);
406- /// let pair = a.join(b);
407- ///
408- /// assert_eq!(block_on(pair), Err(2));
409- /// # }
410- /// ```
411- fn join<B>(self, other: B) -> Join<Self, B::Future>
412- where B: IntoFuture<Error=Self::Error>,
413- Self: Sized,
414- {
415- let f = join::new(self, other.into_future());
416- assert_future::<(Self::Item, B::Item), Self::Error, _>(f)
417- }
418-
419- /// Same as `join`, but with more futures.
420- fn join3<B, C>(self, b: B, c: C) -> Join3<Self, B::Future, C::Future>
421- where B: IntoFuture<Error=Self::Error>,
422- C: IntoFuture<Error=Self::Error>,
423- Self: Sized,
424- {
425- join::new3(self, b.into_future(), c.into_future())
426- }
427-
428- /// Same as `join`, but with more futures.
429- fn join4<B, C, D>(self, b: B, c: C, d: D)
430- -> Join4<Self, B::Future, C::Future, D::Future>
431- where B: IntoFuture<Error=Self::Error>,
432- C: IntoFuture<Error=Self::Error>,
433- D: IntoFuture<Error=Self::Error>,
434- Self: Sized,
435- {
436- join::new4(self, b.into_future(), c.into_future(), d.into_future())
437- }
438-
439- /// Same as `join`, but with more futures.
440- fn join5<B, C, D, E>(self, b: B, c: C, d: D, e: E)
441- -> Join5<Self, B::Future, C::Future, D::Future, E::Future>
442- where B: IntoFuture<Error=Self::Error>,
443- C: IntoFuture<Error=Self::Error>,
444- D: IntoFuture<Error=Self::Error>,
445- E: IntoFuture<Error=Self::Error>,
446- Self: Sized,
447- {
448- join::new5(self, b.into_future(), c.into_future(), d.into_future(),
449- e.into_future())
450- }
451365*/
452366
453367 /// Unwraps this future's ouput, producing a future with this future's
0 commit comments