Skip to content

Commit

Permalink
refactor(error): remove unused Listen variant (hyperium#3311)
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Pfennig <[email protected]>
  • Loading branch information
seanmonstar authored and 0xE282B0 committed Jan 16, 2024
1 parent 7cb9e96 commit 8d55c83
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ pub(super) enum Kind {
/// An `io::Error` that occurred while trying to read or write to a network stream.
#[cfg(any(feature = "http1", feature = "http2"))]
Io,
/// Error creating a TcpListener.
#[cfg(all(feature = "tcp", feature = "server"))]
Listen,
/// User took too long to send headers
#[cfg(all(feature = "http1", feature = "server"))]
HeaderTimeout,
Expand Down Expand Up @@ -245,11 +242,6 @@ impl Error {
Error::new(Kind::Io).with(cause)
}

#[cfg(all(feature = "server", feature = "tcp"))]
pub(super) fn new_listen<E: Into<Cause>>(cause: E) -> Error {
Error::new(Kind::Listen).with(cause)
}

pub(super) fn new_closed() -> Error {
Error::new(Kind::ChannelClosed)
}
Expand Down Expand Up @@ -368,8 +360,6 @@ impl Error {
Kind::UnexpectedMessage => "received unexpected message from connection",
Kind::ChannelClosed => "channel closed",
Kind::Canceled => "operation was canceled",
#[cfg(all(feature = "server", feature = "tcp"))]
Kind::Listen => "error creating server listener",
#[cfg(all(feature = "http1", feature = "server"))]
Kind::HeaderTimeout => "read header from client timeout",
#[cfg(any(feature = "http1", feature = "http2"))]
Expand Down

0 comments on commit 8d55c83

Please sign in to comment.