Don't leak AllowStd type outside the crate

It's not needed as public API and an implementation detail.
pull/3/head
Sebastian Dröge 5 years ago
parent ae0a324116
commit ec71882145
  1. 2
      src/compat.rs
  2. 2
      src/lib.rs

@ -14,7 +14,7 @@ pub(crate) enum ContextWaker {
} }
#[derive(Debug)] #[derive(Debug)]
pub struct AllowStd<S> { pub(crate) struct AllowStd<S> {
inner: S, inner: S,
// We have the problem that external read operations (i.e. the Stream impl) // We have the problem that external read operations (i.e. the Stream impl)
// can trigger both read (AsyncRead) and write (AsyncWrite) operations on // can trigger both read (AsyncRead) and write (AsyncWrite) operations on

@ -254,7 +254,6 @@ impl<S> WebSocketStream<S> {
impl<T> Stream for WebSocketStream<T> impl<T> Stream for WebSocketStream<T>
where where
T: AsyncRead + AsyncWrite + Unpin, T: AsyncRead + AsyncWrite + Unpin,
AllowStd<T>: Read + Write,
{ {
type Item = Result<Message, WsError>; type Item = Result<Message, WsError>;
@ -278,7 +277,6 @@ where
impl<T> Sink<Message> for WebSocketStream<T> impl<T> Sink<Message> for WebSocketStream<T>
where where
T: AsyncRead + AsyncWrite + Unpin, T: AsyncRead + AsyncWrite + Unpin,
AllowStd<T>: Read + Write,
{ {
type Error = WsError; type Error = WsError;

Loading…
Cancel
Save