Skip to content

Commit

Permalink
Properly gate TLS error variants in Display impl
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Mar 30, 2022
1 parent 572693f commit 3878914
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 3878914

Please sign in to comment.