Skip to content

Commit

Permalink
Deprecate extra-docs feature
Browse files Browse the repository at this point in the history
Leaving the docs in place.
  • Loading branch information
Thomasdezeeuw committed Nov 3, 2020
1 parent 40c4af7 commit 25731e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ pipe = ["os-poll"]
tcp = []
udp = []
uds = []
extra-docs = []

# Deprecated features, will be removed in a future version.
extra-docs = [] # Docs are now always present.

[dependencies]
log = "0.4.8"
Expand Down
31 changes: 2 additions & 29 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,11 @@
//!
//! ## Guide
//!
//! A getting started guide is available in the
#![cfg_attr(
feature = "extra-docs",
doc = "[`guide`](../mio/guide/index.html) module."
)]
#![cfg_attr(
not(feature = "extra-docs"),
doc = "`guide` (only available when the `extra-docs` feature is enabled)."
)]
//! A getting started guide is available in the [`guide`] module.
//!
//! ## Available features
//!
//! The available features are described in the
#![cfg_attr(
feature = "extra-docs",
doc = "[`features`](../mio/features/index.html) module."
)]
#![cfg_attr(
not(feature = "extra-docs"),
doc = "`features` (only available when the `extra-docs` feature is enabled)."
)]
//! The available features are described in the [`features`] module.

// macros used internally
#[macro_use]
Expand Down Expand Up @@ -117,8 +101,6 @@ pub mod windows {
}
}

// Enable with `cargo doc --features extra-docs`.
#[cfg(feature = "extra-docs")]
pub mod features {
//! # Mio's optional features.
//!
Expand Down Expand Up @@ -160,17 +142,8 @@ pub mod features {
//! : includes `UnixDatagram`, `UnixListener`, `UnixStream` and `SocketAddr`.
//!
//! All types can be found in the `net` module.
//!
#![cfg_attr(feature = "extra-docs", doc = "## `extra-docs` (enabled)")]
#![cfg_attr(not(feature = "extra-docs"), doc = "## `extra-docs` (disabled)")]
//!
//! This feature includes additional documentation such as this document and
//! the getting started guide. It adds nothing in terms of types (only
//! documentation).
}

// Enable with `cargo doc --features extra-docs`.
#[cfg(feature = "extra-docs")]
pub mod guide {
//! # Getting started guide.
//!
Expand Down

0 comments on commit 25731e8

Please sign in to comment.