mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-28 20:16:41 +00:00
Simplify default feature
This commit is contained in:
parent
dcd7c55cef
commit
2e66c38453
3 changed files with 32 additions and 43 deletions
|
@ -21,10 +21,9 @@ features = ["docs"]
|
||||||
rustdoc-args = ["--cfg", "feature=\"docs\""]
|
rustdoc-args = ["--cfg", "feature=\"docs\""]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["stable"]
|
default = []
|
||||||
docs = ["unstable"]
|
docs = ["unstable"]
|
||||||
unstable = ["broadcaster"]
|
unstable = ["broadcaster"]
|
||||||
stable = []
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-macros = "1.0.0"
|
async-macros = "1.0.0"
|
||||||
|
|
14
src/lib.rs
14
src/lib.rs
|
@ -41,6 +41,7 @@
|
||||||
//! features = ["unstable"]
|
//! features = ["unstable"]
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
#![cfg(feature = "default")]
|
||||||
#![cfg_attr(feature = "docs", feature(doc_cfg))]
|
#![cfg_attr(feature = "docs", feature(doc_cfg))]
|
||||||
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
|
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
|
||||||
#![allow(clippy::mutex_atomic, clippy::module_inception)]
|
#![allow(clippy::mutex_atomic, clippy::module_inception)]
|
||||||
|
@ -49,18 +50,6 @@
|
||||||
#![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")]
|
#![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")]
|
||||||
#![recursion_limit = "2048"]
|
#![recursion_limit = "2048"]
|
||||||
|
|
||||||
/// Declares stable items.
|
|
||||||
#[doc(hidden)]
|
|
||||||
macro_rules! cfg_stable {
|
|
||||||
($($item:item)*) => {
|
|
||||||
$(
|
|
||||||
#[cfg(feature = "stable")]
|
|
||||||
$item
|
|
||||||
)*
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cfg_stable! {
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
|
@ -91,4 +80,3 @@ cfg_stable! {
|
||||||
}
|
}
|
||||||
|
|
||||||
mod macros;
|
mod macros;
|
||||||
}
|
|
||||||
|
|
|
@ -36,6 +36,8 @@ pub use crate::io::seek::SeekExt as _;
|
||||||
pub use crate::io::write::WriteExt as _;
|
pub use crate::io::write::WriteExt as _;
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use crate::stream::stream::StreamExt as _;
|
pub use crate::stream::stream::StreamExt as _;
|
||||||
|
#[doc(hidden)]
|
||||||
|
pub use crate::task_local;
|
||||||
|
|
||||||
cfg_unstable! {
|
cfg_unstable! {
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
|
|
Loading…
Reference in a new issue