From 930d3e08360f501b1e779f47f09e25a5dcd629ea Mon Sep 17 00:00:00 2001 From: stephaneyfx Date: Mon, 10 Oct 2022 10:25:33 -0500 Subject: [PATCH] Implement `Clone` for `Drain` (#2650) --- futures-util/src/sink/drain.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/futures-util/src/sink/drain.rs b/futures-util/src/sink/drain.rs index 5c87edd9fb..3ef8072bdc 100644 --- a/futures-util/src/sink/drain.rs +++ b/futures-util/src/sink/drain.rs @@ -32,6 +32,12 @@ pub fn drain() -> Drain { impl Unpin for Drain {} +impl Clone for Drain { + fn clone(&self) -> Self { + drain() + } +} + impl Sink for Drain { type Error = Infallible;