From e2a07bf80f874e6a1d60efcf195d18e72fc96698 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Fri, 8 Oct 2021 15:08:33 +0200 Subject: [PATCH] Use WsError for the Sink implementation --- src/test.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test.rs b/src/test.rs index 7e09e99ed..a656aca43 100644 --- a/src/test.rs +++ b/src/test.rs @@ -623,31 +623,31 @@ impl fmt::Debug for WsClient { #[cfg(feature = "websocket")] impl Sink for WsClient { - type Error = (); + type Error = WsError; fn poll_ready( self: Pin<&mut Self>, context: &mut Context<'_>, ) -> Poll> { - self.pinned_tx().poll_ready(context).map_err(|_| ()) + self.pinned_tx().poll_ready(context).map_err(WsError::new) } fn start_send(self: Pin<&mut Self>, message: Message) -> Result<(), Self::Error> { - self.pinned_tx().start_send(message).map_err(|_| ()) + self.pinned_tx().start_send(message).map_err(WsError::new) } fn poll_flush( self: Pin<&mut Self>, context: &mut Context<'_>, ) -> Poll> { - self.pinned_tx().poll_flush(context).map_err(|_| ()) + self.pinned_tx().poll_flush(context).map_err(WsError::new) } fn poll_close( self: Pin<&mut Self>, context: &mut Context<'_>, ) -> Poll> { - self.pinned_tx().poll_close(context).map_err(|_| ()) + self.pinned_tx().poll_close(context).map_err(WsError::new) } }