Skip to content

Commit ca3f634

Browse files
rubdoscramertj
authored andcommitted
Implement Clone for Sink combinators where it makes sense
1 parent 48eacfc commit ca3f634

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/sink/from_err.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use {Sink, Poll, StartSend};
55
/// A sink combinator to change the error type of a sink.
66
///
77
/// This is created by the `Sink::from_err` method.
8-
#[derive(Debug)]
8+
#[derive(Clone, Debug)]
99
#[must_use = "futures do nothing unless polled"]
1010
pub struct SinkFromErr<S, E> {
1111
sink: S,

src/sink/map_err.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use sink::Sink;
33
use {Poll, StartSend, Stream};
44

55
/// Sink for the `Sink::sink_map_err` combinator.
6-
#[derive(Debug)]
6+
#[derive(Clone,Debug)]
77
#[must_use = "sinks do nothing unless polled"]
88
pub struct SinkMapErr<S, F> {
99
sink: S,

src/sink/with.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use stream::Stream;
77

88
/// Sink for the `Sink::with` combinator, chaining a computation to run *prior*
99
/// to pushing a value into the underlying sink.
10-
#[derive(Debug)]
10+
#[derive(Clone, Debug)]
1111
#[must_use = "sinks do nothing unless polled"]
1212
pub struct With<S, U, F, Fut>
1313
where S: Sink,
@@ -20,7 +20,7 @@ pub struct With<S, U, F, Fut>
2020
_phantom: PhantomData<fn(U)>,
2121
}
2222

23-
#[derive(Debug)]
23+
#[derive(Clone, Debug)]
2424
enum State<Fut, T> {
2525
Empty,
2626
Process(Fut),

0 commit comments

Comments
 (0)