On a pet project I'm working on, I've set to use async-native-tls feature and when I use into_secure with AsyncNativeTlsConnector::from(TlsConnector::new()), similar to the README, I got the error from title of this bug.
Steps to reproduce
Steps to reproduce the bug you encountered:
use std::error::Error;
use suppaftp::{AsyncFtpStream, AsyncNativeTlsConnector};
use suppaftp::async_native_tls::{TlsConnector, TlsStream};
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
// Create a connection to an FTP server and authenticate to it.
let mut ftp_stream = AsyncFtpStream::connect("localhost:21").await.unwrap();
let mut connector = TlsConnector::new();
let mut ftp_stream =
ftp_stream
.into_secure(AsyncNativeTlsConnector::from(connector), "localhost")
.await
.unwrap();
Ok(())
}
Description
On a pet project I'm working on, I've set to use async-native-tls feature and when I use
into_secure
withAsyncNativeTlsConnector::from(TlsConnector::new())
, similar to the README, I got the error from title of this bug.Steps to reproduce
Steps to reproduce the bug you encountered:
Probably the bug is about this:
https://github.com/veeso/suppaftp/blob/5bf40b4bc68658180bdfe7c54cae5d9869c64ae6/suppaftp/src/lib.rs#L183
Missing to generate a type for async-native-tls feature.
Expected behaviour
Using the above code must work as expected and should compile at least.
Environment
Additional information
None