Skip to content

Commit

Permalink
Remove TryFuture sealing
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Barber committed Jul 19, 2023
1 parent 4587897 commit 9e15e25
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions futures-core/src/future.rs
Expand Up @@ -44,19 +44,9 @@ where
}
}

mod private_try_future {
use super::Future;

pub trait Sealed {}

impl<F, T, E> Sealed for F where F: ?Sized + Future<Output = Result<T, E>> {}
}

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

Expand Down

0 comments on commit 9e15e25

Please sign in to comment.