diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /vendor/futures-util/src/sink | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/futures-util/src/sink')
-rw-r--r-- | vendor/futures-util/src/sink/drain.rs | 6 | ||||
-rw-r--r-- | vendor/futures-util/src/sink/unfold.rs | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/vendor/futures-util/src/sink/drain.rs b/vendor/futures-util/src/sink/drain.rs index 5295115b6..1a5480c0d 100644 --- a/vendor/futures-util/src/sink/drain.rs +++ b/vendor/futures-util/src/sink/drain.rs @@ -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; diff --git a/vendor/futures-util/src/sink/unfold.rs b/vendor/futures-util/src/sink/unfold.rs index 330a068c3..dea1307b6 100644 --- a/vendor/futures-util/src/sink/unfold.rs +++ b/vendor/futures-util/src/sink/unfold.rs @@ -73,7 +73,10 @@ where this.state.set(UnfoldState::Value { value: state }); Ok(()) } - Err(err) => Err(err), + Err(err) => { + this.state.set(UnfoldState::Empty); + Err(err) + } } } else { Ok(()) |