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 10, 2022
1 parent baa6f30 commit f8e2954
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 f8e2954

Please sign in to comment.