Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add constraints for TryFuture supertrait
  • Loading branch information
Harry Barber committed Jul 19, 2023
commit a88e11011e33df8e6345b1a8527447f3dd5399c5
4 changes: 3 additions & 1 deletion futures-core/src/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ mod private_try_future {

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

Expand Down