@@ -289,10 +289,10 @@ extension_trait! {
289
289
use async_std::future;
290
290
291
291
let a = future::ready(1u8);
292
- let b = future::ready(2u8 );
292
+ let b = future::ready(2u16 );
293
293
294
294
let f = a.join(b);
295
- assert_eq!(f.await, (1u8, 2u8 ));
295
+ assert_eq!(f.await, (1u8, 2u16 ));
296
296
# });
297
297
```
298
298
"# ]
@@ -304,7 +304,7 @@ extension_trait! {
304
304
) -> impl Future <Output = ( <Self as std:: future:: Future >:: Output , <F as std:: future:: Future >:: Output ) > [ Join <Self , F >]
305
305
where
306
306
Self : std:: future:: Future + Sized ,
307
- F : std:: future:: Future < Output = < Self as std :: future :: Future > :: Output > ,
307
+ F : std:: future:: Future ,
308
308
{
309
309
Join :: new( self , other)
310
310
}
@@ -328,30 +328,30 @@ extension_trait! {
328
328
use async_std::prelude::*;
329
329
use async_std::future;
330
330
331
- let a = future::ready(Err("Error"));
331
+ let a = future::ready(Err::<u8, &str> ("Error"));
332
332
let b = future::ready(Ok(1u8));
333
333
334
334
let f = a.try_join(b);
335
335
assert_eq!(f.await, Err("Error"));
336
336
337
337
let a = future::ready(Ok::<u8, String>(1u8));
338
- let b = future::ready(Ok::<u8 , String>(2u8 ));
338
+ let b = future::ready(Ok::<u16 , String>(2u16 ));
339
339
340
340
let f = a.try_join(b);
341
- assert_eq!(f.await, Ok((1u8, 2u8 )));
341
+ assert_eq!(f.await, Ok((1u8, 2u16 )));
342
342
#
343
343
# Ok(()) }) }
344
344
```
345
345
"# ]
346
346
#[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
347
347
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
348
- fn try_join<F , T , E >(
348
+ fn try_join<F , A , B , E >(
349
349
self ,
350
350
other: F
351
- ) -> impl Future <Output = Result <( T , T ) , E >> [ TryJoin <Self , F >]
351
+ ) -> impl Future <Output = Result <( A , B ) , E >> [ TryJoin <Self , F >]
352
352
where
353
- Self : std:: future:: Future <Output = Result <T , E >> + Sized ,
354
- F : std:: future:: Future <Output = < Self as std :: future :: Future > :: Output >,
353
+ Self : std:: future:: Future <Output = Result <A , E >> + Sized ,
354
+ F : std:: future:: Future <Output = Result < B , E > >,
355
355
{
356
356
TryJoin :: new( self , other)
357
357
}
0 commit comments