Skip to content

Commit

Permalink
Merge pull request #267 from newpavlov/patch-1
Browse files Browse the repository at this point in the history
Properly gate TLS error variants in Display impl
  • Loading branch information
vi committed Mar 31, 2022
2 parents 572693f + 3878914 commit 40e290a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/result.rs
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 40e290a

Please sign in to comment.