Skip to content

Commit

Permalink
chore: remove Sealed in Transport definition (alloy-rs#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored and ben186 committed Jul 27, 2024
1 parent 17ff9ac commit df410db
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions crates/transport/src/trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ use tower::Service;
///
/// [`TransportConnect`]: crate::TransportConnect
pub trait Transport:
private::Sealed
+ Service<
Service<
RequestPacket,
Response = ResponsePacket,
Error = TransportError,
Future = TransportFut<'static>,
> + Send
+ Sync
+ std::any::Any
+ 'static
{
/// Convert this transport into a boxed trait object.
Expand All @@ -63,8 +61,7 @@ pub trait Transport:
}

impl<T> Transport for T where
T: private::Sealed
+ Service<
T: Service<
RequestPacket,
Response = ResponsePacket,
Error = TransportError,
Expand All @@ -74,20 +71,3 @@ impl<T> Transport for T where
+ 'static
{
}

mod private {
use super::*;

pub trait Sealed {}
impl<T> Sealed for T where
T: Service<
RequestPacket,
Response = ResponsePacket,
Error = TransportError,
Future = TransportFut<'static>,
> + Send
+ Sync
+ 'static
{
}
}

0 comments on commit df410db

Please sign in to comment.