Skip to content

Commit 324ae7c

Browse files
taiki-eNemo157
authored andcommitted
Expose some combinators with appropriate cfg
1 parent 049fcf8 commit 324ae7c

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

futures/src/lib.rs

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ pub mod compat {
8787
8888
pub use futures_util::compat::{
8989
Compat,
90+
CompatSink,
9091
Compat01As03,
9192
Compat01As03Sink,
9293
Executor01Future,
@@ -305,7 +306,7 @@ pub mod sink {
305306
pub use futures_util::sink::{
306307
Close, Flush, Send, SendAll, SinkErrInto, SinkMapErr, With,
307308
SinkExt, Fanout, Drain, DrainError, drain,
308-
// WithFlatMap,
309+
WithFlatMap,
309310
};
310311

311312
#[cfg(feature = "alloc")]
@@ -340,9 +341,9 @@ pub mod stream {
340341
unfold, Unfold,
341342

342343
StreamExt,
343-
Chain, Collect, Concat, Filter, FilterMap, Flatten, Fold, Forward, ForEach, Fuse,
344-
StreamFuture, Inspect, Map, Next, Peekable, Select, Skip, SkipWhile,
345-
Take, TakeWhile, Then, Zip
344+
Chain, Collect, Concat, Filter, FilterMap, Flatten, Fold, Forward,
345+
ForEach, Fuse, StreamFuture, Inspect, Map, Next, SelectNextSome,
346+
Peekable, Select, Skip, SkipWhile, Take, TakeWhile, Then, Zip
346347
};
347348

348349
#[cfg(feature = "alloc")]
@@ -361,23 +362,25 @@ pub mod stream {
361362
futures_unordered, FuturesUnordered,
362363

363364
// For StreamExt:
364-
BufferUnordered, Buffered, SplitStream, SplitSink,
365+
BufferUnordered, Buffered, ForEachConcurrent, SplitStream, SplitSink,
366+
ReuniteError,
365367

366368
select_all, SelectAll,
367369
};
368370

369371
#[cfg(feature = "std")]
370372
pub use futures_util::stream::{
371373
// For StreamExt:
372-
CatchUnwind, ReuniteError,
374+
CatchUnwind,
373375
};
374376

375377
pub use futures_util::try_stream::{
376378
TryStreamExt,
377-
TryNext, TryForEach, ErrInto,
379+
ErrInto, MapOk, MapErr,
380+
TryNext, TryForEach, TryFilterMap,
378381
TryCollect, TryFold, TrySkipWhile,
379382
IntoStream,
380-
// ToDo: AndThen, ErrInto, InspectErr, MapErr, OrElse
383+
// ToDo: AndThen, InspectErr, OrElse
381384
};
382385

383386
#[cfg_attr(
@@ -387,9 +390,12 @@ pub mod stream {
387390
#[cfg(feature = "alloc")]
388391
pub use futures_util::try_stream::{
389392
// For TryStreamExt:
390-
TryBufferUnordered,
391-
// ToDo: AndThen, InspectErr, MapErr, OrElse
393+
TryBufferUnordered, TryForEachConcurrent,
394+
// ToDo: AndThen, InspectErr, OrElse
392395
};
396+
397+
#[cfg(feature = "std")]
398+
pub use futures_util::try_stream::IntoAsyncRead;
393399
}
394400

395401
pub mod task {
@@ -410,18 +416,18 @@ pub mod task {
410416

411417
pub use futures_util::task::noop_waker;
412418

419+
#[cfg(feature = "std")]
420+
pub use futures_util::task::noop_waker_ref;
421+
422+
#[cfg(feature = "alloc")]
423+
pub use futures_util::task::{SpawnExt, LocalSpawnExt};
424+
413425
#[cfg_attr(
414426
feature = "cfg-target-has-atomic",
415427
cfg(all(target_has_atomic = "cas", target_has_atomic = "ptr"))
416428
)]
417429
#[cfg(feature = "alloc")]
418-
pub use futures_util::task::{
419-
WakerRef, waker_ref, ArcWake,
420-
SpawnExt, LocalSpawnExt,
421-
};
422-
423-
#[cfg(feature = "std")]
424-
pub use futures_util::task::noop_waker_ref;
430+
pub use futures_util::task::{WakerRef, waker_ref, ArcWake};
425431

426432
#[cfg_attr(
427433
feature = "cfg-target-has-atomic",

0 commit comments

Comments
 (0)