Skip to content

Commit 25731e8

Browse files
committed
Deprecate extra-docs feature
Leaving the docs in place.
1 parent 40c4af7 commit 25731e8

File tree

2 files changed

+5
-30
lines changed

2 files changed

+5
-30
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ pipe = ["os-poll"]
3333
tcp = []
3434
udp = []
3535
uds = []
36-
extra-docs = []
36+
37+
# Deprecated features, will be removed in a future version.
38+
extra-docs = [] # Docs are now always present.
3739

3840
[dependencies]
3941
log = "0.4.8"

src/lib.rs

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,11 @@
3535
//!
3636
//! ## Guide
3737
//!
38-
//! A getting started guide is available in the
39-
#![cfg_attr(
40-
feature = "extra-docs",
41-
doc = "[`guide`](../mio/guide/index.html) module."
42-
)]
43-
#![cfg_attr(
44-
not(feature = "extra-docs"),
45-
doc = "`guide` (only available when the `extra-docs` feature is enabled)."
46-
)]
38+
//! A getting started guide is available in the [`guide`] module.
4739
//!
4840
//! ## Available features
4941
//!
50-
//! The available features are described in the
51-
#![cfg_attr(
52-
feature = "extra-docs",
53-
doc = "[`features`](../mio/features/index.html) module."
54-
)]
55-
#![cfg_attr(
56-
not(feature = "extra-docs"),
57-
doc = "`features` (only available when the `extra-docs` feature is enabled)."
58-
)]
42+
//! The available features are described in the [`features`] module.
5943
6044
// macros used internally
6145
#[macro_use]
@@ -117,8 +101,6 @@ pub mod windows {
117101
}
118102
}
119103

120-
// Enable with `cargo doc --features extra-docs`.
121-
#[cfg(feature = "extra-docs")]
122104
pub mod features {
123105
//! # Mio's optional features.
124106
//!
@@ -160,17 +142,8 @@ pub mod features {
160142
//! : includes `UnixDatagram`, `UnixListener`, `UnixStream` and `SocketAddr`.
161143
//!
162144
//! All types can be found in the `net` module.
163-
//!
164-
#![cfg_attr(feature = "extra-docs", doc = "## `extra-docs` (enabled)")]
165-
#![cfg_attr(not(feature = "extra-docs"), doc = "## `extra-docs` (disabled)")]
166-
//!
167-
//! This feature includes additional documentation such as this document and
168-
//! the getting started guide. It adds nothing in terms of types (only
169-
//! documentation).
170145
}
171146

172-
// Enable with `cargo doc --features extra-docs`.
173-
#[cfg(feature = "extra-docs")]
174147
pub mod guide {
175148
//! # Getting started guide.
176149
//!

0 commit comments

Comments
 (0)