Skip to content

Commit 2e66c38

Browse files
committed
Simplify default feature
1 parent dcd7c55 commit 2e66c38

File tree

3 files changed

+29
-40
lines changed

3 files changed

+29
-40
lines changed

Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ features = ["docs"]
2121
rustdoc-args = ["--cfg", "feature=\"docs\""]
2222

2323
[features]
24-
default = ["stable"]
24+
default = []
2525
docs = ["unstable"]
2626
unstable = ["broadcaster"]
27-
stable = []
2827

2928
[dependencies]
3029
async-macros = "1.0.0"

src/lib.rs

+26-38
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
//! features = ["unstable"]
4242
//! ```
4343
44+
#![cfg(feature = "default")]
4445
#![cfg_attr(feature = "docs", feature(doc_cfg))]
4546
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
4647
#![allow(clippy::mutex_atomic, clippy::module_inception)]
@@ -49,46 +50,33 @@
4950
#![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")]
5051
#![recursion_limit = "2048"]
5152

52-
/// Declares stable items.
53-
#[doc(hidden)]
54-
macro_rules! cfg_stable {
55-
($($item:item)*) => {
56-
$(
57-
#[cfg(feature = "stable")]
58-
$item
59-
)*
60-
}
61-
}
62-
63-
cfg_stable! {
64-
#[macro_use]
65-
mod utils;
53+
#[macro_use]
54+
mod utils;
6655

67-
pub mod fs;
68-
pub mod future;
69-
pub mod io;
70-
pub mod net;
71-
pub mod os;
72-
pub mod path;
73-
pub mod prelude;
74-
pub mod stream;
75-
pub mod sync;
76-
pub mod task;
56+
pub mod fs;
57+
pub mod future;
58+
pub mod io;
59+
pub mod net;
60+
pub mod os;
61+
pub mod path;
62+
pub mod prelude;
63+
pub mod stream;
64+
pub mod sync;
65+
pub mod task;
7766

78-
cfg_unstable! {
79-
pub mod pin;
80-
pub mod process;
67+
cfg_unstable! {
68+
pub mod pin;
69+
pub mod process;
8170

82-
mod unit;
83-
mod vec;
84-
mod result;
85-
mod option;
86-
mod string;
87-
mod collections;
71+
mod unit;
72+
mod vec;
73+
mod result;
74+
mod option;
75+
mod string;
76+
mod collections;
8877

89-
#[doc(inline)]
90-
pub use std::{write, writeln};
91-
}
92-
93-
mod macros;
78+
#[doc(inline)]
79+
pub use std::{write, writeln};
9480
}
81+
82+
mod macros;

src/prelude.rs

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ pub use crate::io::seek::SeekExt as _;
3636
pub use crate::io::write::WriteExt as _;
3737
#[doc(hidden)]
3838
pub use crate::stream::stream::StreamExt as _;
39+
#[doc(hidden)]
40+
pub use crate::task_local;
3941

4042
cfg_unstable! {
4143
#[doc(no_inline)]

0 commit comments

Comments
 (0)