Skip to content

Commit

Permalink
feat: Send + Sync trait to AsyncFtpStream/FtpStream (#61)
Browse files Browse the repository at this point in the history
* feat: Send trait to AsyncFtpStream/FtpStream

* fix: ci failing
  • Loading branch information
newfla authored Nov 14, 2023
1 parent d58f42d commit 388533e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions suppaftp/src/async_ftp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ where
#[cfg(not(feature = "async-secure"))]
marker: PhantomData<T>,
#[cfg(feature = "async-secure")]
tls_ctx: Option<Box<dyn AsyncTlsConnector<Stream = T>>>,
tls_ctx: Option<Box<dyn AsyncTlsConnector<Stream = T> + Send + Sync + 'static>>,
#[cfg(feature = "async-secure")]
domain: Option<String>,
}
Expand Down Expand Up @@ -121,7 +121,7 @@ where
#[cfg_attr(docsrs, doc(cfg(feature = "async-secure")))]
pub async fn into_secure(
mut self,
tls_connector: impl AsyncTlsConnector<Stream = T> + 'static,
tls_connector: impl AsyncTlsConnector<Stream = T> + Send + Sync + 'static,
domain: &str,
) -> FtpResult<Self> {
debug!("Initializing TLS auth");
Expand Down Expand Up @@ -179,7 +179,7 @@ where
)]
pub async fn connect_secure_implicit<A: ToSocketAddrs>(
addr: A,
tls_connector: impl AsyncTlsConnector<Stream = T> + 'static,
tls_connector: impl AsyncTlsConnector<Stream = T> + Send + Sync + 'static,
domain: &str,
) -> FtpResult<Self> {
debug!("Connecting to server (secure)");
Expand Down
6 changes: 3 additions & 3 deletions suppaftp/src/sync_ftp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ where
#[cfg(not(feature = "secure"))]
marker: PhantomData<T>,
#[cfg(feature = "secure")]
tls_ctx: Option<Box<dyn TlsConnector<Stream = T>>>,
tls_ctx: Option<Box<dyn TlsConnector<Stream = T> + Send + Sync + 'static>>,
#[cfg(feature = "secure")]
domain: Option<String>,
}
Expand Down Expand Up @@ -134,7 +134,7 @@ where
#[cfg_attr(docsrs, doc(cfg(feature = "secure")))]
pub fn into_secure(
mut self,
tls_connector: impl TlsConnector<Stream = T> + 'static,
tls_connector: impl TlsConnector<Stream = T> + Send + Sync + 'static,
domain: &str,
) -> FtpResult<Self> {
// Ask the server to start securing data.
Expand Down Expand Up @@ -184,7 +184,7 @@ where
#[cfg_attr(docsrs, doc(cfg(all(feature = "secure", feature = "deprecated"))))]
pub fn connect_secure_implicit<A: ToSocketAddrs>(
addr: A,
tls_connector: impl TlsConnector<Stream = T> + 'static,
tls_connector: impl TlsConnector<Stream = T> + Send + Sync +'static,
domain: &str,
) -> FtpResult<Self> {
debug!("Connecting to server (secure)");
Expand Down

0 comments on commit 388533e

Please sign in to comment.