You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/06/23 03:00:29 UTC

[incubator-opendal] branch implement-sink-for-s3 updated: Fix args

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch implement-sink-for-s3
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/implement-sink-for-s3 by this push:
     new 04085520f Fix args
04085520f is described below

commit 04085520f3f8830ccbfc983263606926d7e2c312
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Fri Jun 23 11:00:19 2023 +0800

    Fix args
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 core/src/types/writer.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/src/types/writer.rs b/core/src/types/writer.rs
index af54d5ace..269e720c6 100644
--- a/core/src/types/writer.rs
+++ b/core/src/types/writer.rs
@@ -123,14 +123,14 @@ impl Writer {
     ///     Ok(())
     /// }
     /// ```
-    pub async fn sink<S, T>(&mut self, size: u64, s: S) -> Result<()>
+    pub async fn sink<S, T>(&mut self, size: u64, sink_from: S) -> Result<()>
     where
         S: futures::Stream<Item = Result<T>> + Send + Sync + Unpin + 'static,
         T: Into<Bytes>,
     {
         if let State::Idle(Some(w)) = &mut self.state {
             let s = Box::new(oio::into_stream::from_futures_stream(
-                s.map_ok(|v| v.into()),
+                sink_from.map_ok(|v| v.into()),
             ));
             w.sink(size, s).await
         } else {