From 3878914df743864098559ff60ef14249e789fd84 Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Wed, 30 Mar 2022 17:06:35 +0000 Subject: [PATCH] Properly gate TLS error variants in Display impl --- src/result.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/result.rs b/src/result.rs index a36985efc8..0c01c07d85 100644 --- a/src/result.rs +++ b/src/result.rs @@ -81,9 +81,11 @@ impl fmt::Display for WebSocketOtherError { #[cfg(any(feature = "sync-ssl", feature = "async-ssl"))] WebSocketOtherError::TlsError(e) => write!(fmt, "WebSocket SSL error: {}", e), WebSocketOtherError::ProtocolError(e) => write!(fmt, "WebSocketError: {}", e), + #[cfg(any(feature = "sync-ssl", feature = "async-ssl"))] WebSocketOtherError::TlsHandshakeFailure => { write!(fmt, "WebSocketError: {}", "TLS Handshake failure") } + #[cfg(any(feature = "sync-ssl", feature = "async-ssl"))] WebSocketOtherError::TlsHandshakeInterruption => { write!(fmt, "WebSocketError: {}", "TLS Handshake interrupted") }