Skip to content

Commit 4258705

Browse files
Arnavionseanmonstar
authored andcommitted
docs(server): use cfg_feature! on hyper::server::conn::tcp instead of #[cfg]
This is required to surface the required feature (`tcp`) in the generated docs for `hyper::server::conn::{AddrIncoming, AddrStream}`. Before this change, their docs only mentioned the features needed for the `hyper::server::conn` mod itself. Fixes #2425
1 parent dfa1bb2 commit 4258705

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/server/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ cfg_feature! {
6161
pub mod conn;
6262
mod server;
6363
mod shutdown;
64-
#[cfg(feature = "tcp")]
65-
mod tcp;
64+
65+
cfg_feature! {
66+
#![feature = "tcp"]
67+
68+
mod tcp;
69+
}
6670
}

0 commit comments

Comments
 (0)