@@ -92,15 +92,6 @@ macro_rules! generate {
9292generate ! {
9393 /// Future for the [`try_join`](try_join()) function.
9494 ( TryJoin , <Fut1 , Fut2 >) ,
95-
96- /// Future for the [`try_join3`] function.
97- ( TryJoin3 , <Fut1 , Fut2 , Fut3 >) ,
98-
99- /// Future for the [`try_join4`] function.
100- ( TryJoin4 , <Fut1 , Fut2 , Fut3 , Fut4 >) ,
101-
102- /// Future for the [`try_join5`] function.
103- ( TryJoin5 , <Fut1 , Fut2 , Fut3 , Fut4 , Fut5 >) ,
10495}
10596
10697/// Joins the result of two futures, waiting for them both to complete or
@@ -152,105 +143,3 @@ where
152143{
153144 assert_future :: < Result < ( Fut1 :: Ok , Fut2 :: Ok ) , Fut1 :: Error > , _ > ( TryJoin :: new ( future1, future2) )
154145}
155-
156- /// Same as [`try_join`](try_join()), but with more futures.
157- ///
158- /// # Examples
159- ///
160- /// ```
161- /// # futures::executor::block_on(async {
162- /// use futures::future;
163- ///
164- /// let a = future::ready(Ok::<i32, i32>(1));
165- /// let b = future::ready(Ok::<i32, i32>(2));
166- /// let c = future::ready(Ok::<i32, i32>(3));
167- /// let tuple = future::try_join3(a, b, c);
168- ///
169- /// assert_eq!(tuple.await, Ok((1, 2, 3)));
170- /// # });
171- /// ```
172- pub fn try_join3 < Fut1 , Fut2 , Fut3 > (
173- future1 : Fut1 ,
174- future2 : Fut2 ,
175- future3 : Fut3 ,
176- ) -> TryJoin3 < Fut1 , Fut2 , Fut3 >
177- where
178- Fut1 : TryFuture ,
179- Fut2 : TryFuture < Error = Fut1 :: Error > ,
180- Fut3 : TryFuture < Error = Fut1 :: Error > ,
181- {
182- assert_future :: < Result < ( Fut1 :: Ok , Fut2 :: Ok , Fut3 :: Ok ) , Fut1 :: Error > , _ > ( TryJoin3 :: new (
183- future1, future2, future3,
184- ) )
185- }
186-
187- /// Same as [`try_join`](try_join()), but with more futures.
188- ///
189- /// # Examples
190- ///
191- /// ```
192- /// # futures::executor::block_on(async {
193- /// use futures::future;
194- ///
195- /// let a = future::ready(Ok::<i32, i32>(1));
196- /// let b = future::ready(Ok::<i32, i32>(2));
197- /// let c = future::ready(Ok::<i32, i32>(3));
198- /// let d = future::ready(Ok::<i32, i32>(4));
199- /// let tuple = future::try_join4(a, b, c, d);
200- ///
201- /// assert_eq!(tuple.await, Ok((1, 2, 3, 4)));
202- /// # });
203- /// ```
204- pub fn try_join4 < Fut1 , Fut2 , Fut3 , Fut4 > (
205- future1 : Fut1 ,
206- future2 : Fut2 ,
207- future3 : Fut3 ,
208- future4 : Fut4 ,
209- ) -> TryJoin4 < Fut1 , Fut2 , Fut3 , Fut4 >
210- where
211- Fut1 : TryFuture ,
212- Fut2 : TryFuture < Error = Fut1 :: Error > ,
213- Fut3 : TryFuture < Error = Fut1 :: Error > ,
214- Fut4 : TryFuture < Error = Fut1 :: Error > ,
215- {
216- assert_future :: < Result < ( Fut1 :: Ok , Fut2 :: Ok , Fut3 :: Ok , Fut4 :: Ok ) , Fut1 :: Error > , _ > (
217- TryJoin4 :: new ( future1, future2, future3, future4) ,
218- )
219- }
220-
221- /// Same as [`try_join`](try_join()), but with more futures.
222- ///
223- /// # Examples
224- ///
225- /// ```
226- /// # futures::executor::block_on(async {
227- /// use futures::future;
228- ///
229- /// let a = future::ready(Ok::<i32, i32>(1));
230- /// let b = future::ready(Ok::<i32, i32>(2));
231- /// let c = future::ready(Ok::<i32, i32>(3));
232- /// let d = future::ready(Ok::<i32, i32>(4));
233- /// let e = future::ready(Ok::<i32, i32>(5));
234- /// let tuple = future::try_join5(a, b, c, d, e);
235- ///
236- /// assert_eq!(tuple.await, Ok((1, 2, 3, 4, 5)));
237- /// # });
238- /// ```
239- pub fn try_join5 < Fut1 , Fut2 , Fut3 , Fut4 , Fut5 > (
240- future1 : Fut1 ,
241- future2 : Fut2 ,
242- future3 : Fut3 ,
243- future4 : Fut4 ,
244- future5 : Fut5 ,
245- ) -> TryJoin5 < Fut1 , Fut2 , Fut3 , Fut4 , Fut5 >
246- where
247- Fut1 : TryFuture ,
248- Fut2 : TryFuture < Error = Fut1 :: Error > ,
249- Fut3 : TryFuture < Error = Fut1 :: Error > ,
250- Fut4 : TryFuture < Error = Fut1 :: Error > ,
251- Fut5 : TryFuture < Error = Fut1 :: Error > ,
252- {
253- assert_future :: < Result < ( Fut1 :: Ok , Fut2 :: Ok , Fut3 :: Ok , Fut4 :: Ok , Fut5 :: Ok ) , Fut1 :: Error > , _ > (
254- TryJoin5 :: new ( future1, future2, future3, future4, future5) ,
255- )
256- }
0 commit comments