From 8db5e6d71bbeb32f0f388dc0a6b58bc899376725 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 11 Sep 2023 15:41:57 -0400 Subject: [PATCH] refactor(error): remove unused Listen variant --- src/error.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/error.rs b/src/error.rs index b07a22c409..5f50f3ccf8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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, @@ -245,11 +242,6 @@ impl Error { Error::new(Kind::Io).with(cause) } - #[cfg(all(feature = "server", feature = "tcp"))] - pub(super) fn new_listen>(cause: E) -> Error { - Error::new(Kind::Listen).with(cause) - } - pub(super) fn new_closed() -> Error { Error::new(Kind::ChannelClosed) } @@ -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"))]