This is an automated email from the ASF dual-hosted git repository. junouyang pushed a commit to branch bump/suppaftp in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
commit 4a2b9978dd59ff3defbf9cbd60b6658738275a0d Author: owl <[email protected]> AuthorDate: Wed Nov 15 22:41:09 2023 +0800 fix: fix code --- core/Cargo.toml | 1 - core/src/services/ftp/backend.rs | 11 +++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/Cargo.toml b/core/Cargo.toml index 85aa539b4..9b74ff691 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -51,7 +51,6 @@ default = [ "services-webdav", "services-webhdfs", "services-azfile", - "services-ftp", ] # Build docs or not. diff --git a/core/src/services/ftp/backend.rs b/core/src/services/ftp/backend.rs index d0d9d9bb9..27d94f3b9 100644 --- a/core/src/services/ftp/backend.rs +++ b/core/src/services/ftp/backend.rs @@ -28,14 +28,14 @@ use futures::AsyncRead; use futures::AsyncReadExt; use http::Uri; use log::debug; -use suppaftp::AsyncNativeTlsFtpStream; +use suppaftp::async_native_tls::TlsConnector; use suppaftp::list::File; use suppaftp::types::FileType; use suppaftp::types::Response; +use suppaftp::AsyncNativeTlsConnector; +use suppaftp::AsyncNativeTlsFtpStream; use suppaftp::FtpError; use suppaftp::ImplAsyncFtpStream; -use suppaftp::async_native_tls::TlsConnector; -use suppaftp::AsyncNativeTlsConnector; use suppaftp::Status; use tokio::sync::OnceCell; @@ -223,7 +223,10 @@ impl bb8::ManageConnection for Manager { // switch to secure mode if ssl/tls is on. let mut ftp_stream = if self.enable_secure { stream - .into_secure(AsyncNativeTlsConnector::from(TlsConnector::new()), &self.endpoint) + .into_secure( + AsyncNativeTlsConnector::from(TlsConnector::new()), + &self.endpoint, + ) .await? } else { stream
