From ec71882145932a033e181c74004fdbc602a379a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 24 Nov 2019 20:30:09 +0100 Subject: [PATCH] Don't leak AllowStd type outside the crate It's not needed as public API and an implementation detail. --- src/compat.rs | 2 +- src/lib.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compat.rs b/src/compat.rs index 644f856..3c93b1d 100644 --- a/src/compat.rs +++ b/src/compat.rs @@ -14,7 +14,7 @@ pub(crate) enum ContextWaker { } #[derive(Debug)] -pub struct AllowStd { +pub(crate) struct AllowStd { inner: S, // We have the problem that external read operations (i.e. the Stream impl) // can trigger both read (AsyncRead) and write (AsyncWrite) operations on diff --git a/src/lib.rs b/src/lib.rs index 874d9df..751ca7b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -254,7 +254,6 @@ impl WebSocketStream { impl Stream for WebSocketStream where T: AsyncRead + AsyncWrite + Unpin, - AllowStd: Read + Write, { type Item = Result; @@ -278,7 +277,6 @@ where impl Sink for WebSocketStream where T: AsyncRead + AsyncWrite + Unpin, - AllowStd: Read + Write, { type Error = WsError;