Skip to content

Commit

Permalink
Implement Clone for Drain (#2650)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaneyfx authored Oct 10, 2022
1 parent baa6f30 commit 930d3e0
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 930d3e0

Please sign in to comment.