This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch cleanup-sink
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/cleanup-sink by this push:
new 0f0b8cc7c Return not supported for abort
0f0b8cc7c is described below
commit 0f0b8cc7c5ac9f2fdb78d2da6d88a3d94275eb04
Author: Xuanwo <[email protected]>
AuthorDate: Thu Aug 31 17:50:22 2023 +0800
Return not supported for abort
Signed-off-by: Xuanwo <[email protected]>
---
core/src/services/sftp/writer.rs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/core/src/services/sftp/writer.rs b/core/src/services/sftp/writer.rs
index ce039b8c4..384d5ce82 100644
--- a/core/src/services/sftp/writer.rs
+++ b/core/src/services/sftp/writer.rs
@@ -21,7 +21,7 @@ use openssh_sftp_client::file::File;
use crate::raw::oio;
use crate::raw::oio::StreamExt;
-use crate::Result;
+use crate::*;
pub struct SftpWriter {
file: File,
@@ -50,7 +50,10 @@ impl oio::Write for SftpWriter {
}
async fn abort(&mut self) -> Result<()> {
- Ok(())
+ Err(Error::new(
+ ErrorKind::Unsupported,
+ "output writer doesn't support abort",
+ ))
}
async fn close(&mut self) -> Result<()> {