mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-01 07:39:40 +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\""]
|
||||
|
||||
[features]
|
||||
default = ["stable"]
|
||||
default = []
|
||||
docs = ["unstable"]
|
||||
unstable = ["broadcaster"]
|
||||
stable = []
|
||||
|
||||
[dependencies]
|
||||
async-macros = "1.0.0"
|
||||
|
|
70
src/lib.rs
70
src/lib.rs
|
@ -41,6 +41,7 @@
|
|||
//! features = ["unstable"]
|
||||
//! ```
|
||||
|
||||
#![cfg(feature = "default")]
|
||||
#![cfg_attr(feature = "docs", feature(doc_cfg))]
|
||||
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
|
||||
#![allow(clippy::mutex_atomic, clippy::module_inception)]
|
||||
|
@ -49,46 +50,33 @@
|
|||
#![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")]
|
||||
#![recursion_limit = "2048"]
|
||||
|
||||
/// Declares stable items.
|
||||
#[doc(hidden)]
|
||||
macro_rules! cfg_stable {
|
||||
($($item:item)*) => {
|
||||
$(
|
||||
#[cfg(feature = "stable")]
|
||||
$item
|
||||
)*
|
||||
}
|
||||
#[macro_use]
|
||||
mod utils;
|
||||
|
||||
pub mod fs;
|
||||
pub mod future;
|
||||
pub mod io;
|
||||
pub mod net;
|
||||
pub mod os;
|
||||
pub mod path;
|
||||
pub mod prelude;
|
||||
pub mod stream;
|
||||
pub mod sync;
|
||||
pub mod task;
|
||||
|
||||
cfg_unstable! {
|
||||
pub mod pin;
|
||||
pub mod process;
|
||||
|
||||
mod unit;
|
||||
mod vec;
|
||||
mod result;
|
||||
mod option;
|
||||
mod string;
|
||||
mod collections;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use std::{write, writeln};
|
||||
}
|
||||
|
||||
cfg_stable! {
|
||||
#[macro_use]
|
||||
mod utils;
|
||||
|
||||
pub mod fs;
|
||||
pub mod future;
|
||||
pub mod io;
|
||||
pub mod net;
|
||||
pub mod os;
|
||||
pub mod path;
|
||||
pub mod prelude;
|
||||
pub mod stream;
|
||||
pub mod sync;
|
||||
pub mod task;
|
||||
|
||||
cfg_unstable! {
|
||||
pub mod pin;
|
||||
pub mod process;
|
||||
|
||||
mod unit;
|
||||
mod vec;
|
||||
mod result;
|
||||
mod option;
|
||||
mod string;
|
||||
mod collections;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use std::{write, writeln};
|
||||
}
|
||||
|
||||
mod macros;
|
||||
}
|
||||
mod macros;
|
||||
|
|
|
@ -36,6 +36,8 @@ pub use crate::io::seek::SeekExt as _;
|
|||
pub use crate::io::write::WriteExt as _;
|
||||
#[doc(hidden)]
|
||||
pub use crate::stream::stream::StreamExt as _;
|
||||
#[doc(hidden)]
|
||||
pub use crate::task_local;
|
||||
|
||||
cfg_unstable! {
|
||||
#[doc(no_inline)]
|
||||
|
|
Loading…
Reference in a new issue