Skip to content

Commit

Permalink
Implement Clone for Drain
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaneyfx committed Oct 7, 2022
1 parent 7a98cf0 commit 86c2de5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions futures-util/src/sink/drain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ pub fn drain<T>() -> Drain<T> {

impl<T> Unpin for Drain<T> {}

impl<T> Clone for Drain<T> {
fn clone(&self) -> Self {
drain()
}
}

impl<T> Sink<T> for Drain<T> {
type Error = Infallible;

Expand Down

0 comments on commit 86c2de5

Please sign in to comment.