Skip to content

Commit 8be84ea

Browse files
MajorBreakfastcramertj
authored andcommitted
Bring back `SinkExt::Fanout" but keep its tests disabled for now
1 parent 3df88d6 commit 8be84ea

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

futures-util/src/sink/fanout.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ impl<A, B> Sink for Fanout<A, B>
7979
}
8080
}
8181

82+
/* ToDo Reenable test: Disabled because `StreamExt::forward` is not implemented
8283
#[cfg(test)]
8384
#[cfg(feature = "std")]
8485
mod tests {
@@ -107,3 +108,4 @@ mod tests {
107108
assert_eq!(lists, Ok((&*expected, &*expected)));
108109
}
109110
}
111+
*/

futures-util/src/sink/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use super::future::Either;
99
use core::mem::PinMut;
1010

1111
mod close;
12-
// mod fanout;
12+
mod fanout;
1313
mod flush;
1414
mod err_into;
1515
mod map_err;
@@ -24,7 +24,7 @@ if_std! {
2424
}
2525

2626
pub use self::close::Close;
27-
// pub use self::fanout::Fanout;
27+
pub use self::fanout::Fanout;
2828
pub use self::flush::Flush;
2929
pub use self::err_into::SinkErrInto;
3030
pub use self::map_err::SinkMapErr;
@@ -167,13 +167,13 @@ pub trait SinkExt: Sink {
167167
///
168168
/// This adapter clones each incoming item and forwards it to both this as well as
169169
/// the other sink at the same time.
170-
/*fn fanout<S>(self, other: S) -> Fanout<Self, S>
170+
fn fanout<S>(self, other: S) -> Fanout<Self, S>
171171
where Self: Sized,
172172
Self::SinkItem: Clone,
173173
S: Sink<SinkItem=Self::SinkItem, SinkError=Self::SinkError>
174174
{
175175
fanout::new(self, other)
176-
}*/
176+
}
177177

178178
/// Flush the sync, processing all pending items.
179179
///

futures/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ pub mod sink {
317317

318318
pub use futures_util::sink::{
319319
Close, Flush, Send, SendAll, SinkErrInto, SinkMapErr, With,
320-
SinkExt,
321-
// WithFlatMap, Fanout,
320+
SinkExt, Fanout,
321+
// WithFlatMap,
322322
};
323323

324324
#[cfg(feature = "std")]

0 commit comments

Comments
 (0)