Skip to content

Commit a88e110

Browse files
author
Harry Barber
committed
Add constraints for TryFuture supertrait
1 parent 28cb6a2 commit a88e110

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

futures-core/src/future.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ mod private_try_future {
5555

5656
/// A convenience for futures that return `Result` values that includes
5757
/// a variety of adapters tailored to such futures.
58-
pub trait TryFuture: Future + private_try_future::Sealed {
58+
pub trait TryFuture:
59+
Future<Output = Result<Self::Ok, Self::Error>> + private_try_future::Sealed
60+
{
5961
/// The type of successful values yielded by this future
6062
type Ok;
6163

0 commit comments

Comments
 (0)