Skip to content

Commit 86bc750

Browse files
authored
refactor(server): allow deprecated in the server module (#3165)
1 parent 02fe20f commit 86bc750

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/server/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ pub use self::server::Server;
158158
cfg_feature! {
159159
#![any(feature = "http1", feature = "http2")]
160160

161+
#[cfg_attr(feature = "deprecated", allow(deprecated))]
161162
pub(crate) mod server;
162163
pub use self::server::Builder;
163164

src/server/server.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use crate::common::exec::{ConnStreamExec, NewSvcExec};
2020
use crate::common::{task, Future, Pin, Poll, Unpin};
2121
// Renamed `Http` as `Http_` for now so that people upgrading don't see an
2222
// error that `hyper::server::Http` is private...
23-
#[cfg_attr(feature = "deprecated", allow(deprecated))]
2423
use super::conn::{Connection, Http as Http_, UpgradeableConnection};
2524
use super::shutdown::{Graceful, GracefulWatcher};
2625
use crate::service::{HttpService, MakeServiceRef};
@@ -34,7 +33,6 @@ pin_project! {
3433
/// handlers. It is built using the [`Builder`](Builder), and the future
3534
/// completes when the server has been shutdown. It should be run by an
3635
/// `Executor`.
37-
#[cfg_attr(feature = "deprecated", allow(deprecated))]
3836
pub struct Server<I, S, E = Exec> {
3937
#[pin]
4038
incoming: I,
@@ -46,7 +44,6 @@ pin_project! {
4644
/// A builder for a [`Server`](Server).
4745
#[derive(Debug)]
4846
#[cfg_attr(docsrs, doc(cfg(any(feature = "http1", feature = "http2"))))]
49-
#[cfg_attr(feature = "deprecated", allow(deprecated))]
5047
pub struct Builder<I, E = Exec> {
5148
incoming: I,
5249
protocol: Http_<E>,
@@ -55,7 +52,6 @@ pub struct Builder<I, E = Exec> {
5552
// ===== impl Server =====
5653

5754
#[cfg_attr(docsrs, doc(cfg(any(feature = "http1", feature = "http2"))))]
58-
#[cfg_attr(feature = "deprecated", allow(deprecated))]
5955
impl<I> Server<I, ()> {
6056
/// Starts a [`Builder`](Builder) with the provided incoming stream.
6157
pub fn builder(incoming: I) -> Builder<I> {
@@ -109,7 +105,6 @@ impl<S, E> Server<AddrIncoming, S, E> {
109105
}
110106

111107
#[cfg_attr(docsrs, doc(cfg(any(feature = "http1", feature = "http2"))))]
112-
#[cfg_attr(feature = "deprecated", allow(deprecated))]
113108
impl<I, IO, IE, S, E, B> Server<I, S, E>
114109
where
115110
I: Accept<Conn = IO, Error = IE>,
@@ -212,7 +207,6 @@ where
212207
}
213208

214209
#[cfg_attr(docsrs, doc(cfg(any(feature = "http1", feature = "http2"))))]
215-
#[cfg_attr(feature = "deprecated", allow(deprecated))]
216210
impl<I, IO, IE, S, B, E> Future for Server<I, S, E>
217211
where
218212
I: Accept<Conn = IO, Error = IE>,
@@ -243,7 +237,6 @@ impl<I: fmt::Debug, S: fmt::Debug> fmt::Debug for Server<I, S> {
243237
// ===== impl Builder =====
244238

245239
#[cfg_attr(docsrs, doc(cfg(any(feature = "http1", feature = "http2"))))]
246-
#[cfg_attr(feature = "deprecated", allow(deprecated))]
247240
impl<I, E> Builder<I, E> {
248241
/// Start a new builder, wrapping an incoming stream and low-level options.
249242
///
@@ -778,7 +771,6 @@ pin_project! {
778771
#[must_use = "futures do nothing unless polled"]
779772
#[derive(Debug)]
780773
#[cfg_attr(docsrs, doc(cfg(any(feature = "http1", feature = "http2"))))]
781-
#[cfg_attr(feature = "deprecated", allow(deprecated))]
782774
pub struct Connecting<I, F, E = Exec> {
783775
#[pin]
784776
future: F,

0 commit comments

Comments
 (0)