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 and taiki-e committed Oct 20, 2022
1 parent 5364e6c commit 521f2ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions futures-util/src/sink/drain.rs
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 = Never;

Expand Down

0 comments on commit 521f2ae

Please sign in to comment.