Skip to content

Commit 25fb8eb

Browse files
committed
promote future and stream to top level
1 parent c36bd5b commit 25fb8eb

21 files changed

+20
-22
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,26 @@
4848
//! These are unique capabilities provided by WASI 0.2, and because this library
4949
//! is specific to that are exposed from here.
5050
51+
pub mod future;
5152
pub mod http;
5253
pub mod io;
5354
pub mod iter;
5455
pub mod net;
5556
pub mod rand;
5657
pub mod runtime;
58+
pub mod stream;
5759
pub mod time;
5860

5961
pub use wstd_macro::attr_macro_main as main;
6062

6163
pub mod prelude {
64+
pub use crate::future::FutureExt as _;
65+
pub use crate::future::Timer as _;
6266
pub use crate::http::Body as _;
6367
pub use crate::io::AsyncRead as _;
6468
pub use crate::io::AsyncWrite as _;
65-
pub use crate::time::future::FutureExt as _;
66-
pub use crate::time::future::Timer as _;
67-
pub use crate::time::stream::IntoStream as _;
68-
pub use crate::time::stream::StreamExt as _;
69+
pub use crate::stream::IntoStream as _;
70+
pub use crate::stream::StreamExt as _;
6971
pub use std::future::IntoFuture as _;
7072
}
7173

src/time/stream/buffer.rs renamed to src/stream/buffer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ mod test {
112112
let buffer = Duration::from_millis(20);
113113

114114
let mut counter = 0;
115-
crate::time::stream::interval(interval)
115+
crate::stream::interval(interval)
116116
.take(10)
117117
.buffer(buffer)
118118
.for_each(|buf| counter += buf.len())
@@ -129,7 +129,7 @@ mod test {
129129
let buffer = Duration::from_millis(10);
130130

131131
let mut counter = 0;
132-
crate::time::stream::interval(interval)
132+
crate::stream::interval(interval)
133133
.take(10)
134134
.buffer(buffer)
135135
.for_each(|buf| counter += buf.len())

src/time/stream/debounce.rs renamed to src/stream/debounce.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use futures_core::ready;
55
use futures_core::stream::Stream;
66
use pin_project_lite::pin_project;
77

8-
use crate::time::future::Timer;
8+
use crate::future::Timer;
99

1010
pin_project! {
1111
/// Debounce the stream.
@@ -116,7 +116,7 @@ mod test {
116116
let debounce = Duration::from_millis(20);
117117

118118
let mut counter = 0;
119-
crate::time::stream::interval(interval)
119+
crate::stream::interval(interval)
120120
.take(10)
121121
.debounce(debounce)
122122
.for_each(|_| counter += 1)
@@ -133,7 +133,7 @@ mod test {
133133
let debounce = Duration::from_millis(10);
134134

135135
let mut counter = 0;
136-
crate::time::stream::interval(interval)
136+
crate::stream::interval(interval)
137137
.take(10)
138138
.debounce(debounce)
139139
.for_each(|_| counter += 1)
File renamed without changes.

0 commit comments

Comments
 (0)