Increase dependency specificity for async-tls
continuous-integration/drone/pr Build encountered an error Details

This fixes a build error where async-tls v0.10.0 builds fine, but async-tls v0.10.1 (which includes and update from rustls v0.18 to rustls v0.19, fails.

This is a build error that I believe additionally affects the current crates.io release.
This commit is contained in:
Emi Tatsuo 2020-12-10 12:46:27 -05:00
parent bebfa4d7b1
commit 182b3e5da6
No known key found for this signature in database
GPG Key ID: 68FAB2E2E6DFC98B
2 changed files with 2 additions and 3 deletions

View File

@ -11,7 +11,7 @@ repository = "https://tulpa.dev/cadey/maj"
[dependencies] [dependencies]
async-std = { version = "1.6", optional = true } async-std = { version = "1.6", optional = true }
async-tls = { default-features = false, optional = true, version = "0" } async-tls = { default-features = false, optional = true, version = "=0.10.0" }
async-trait = { version = "0", optional = true } async-trait = { version = "0", optional = true }
log = "0.4" log = "0.4"
mime_guess = "2.0" mime_guess = "2.0"

View File

@ -51,10 +51,9 @@ pub async fn serve(
) -> Result ) -> Result
where where
{ {
let cfg = Arc::new(cfg);
let listener = TcpListener::bind(&format!("{}:{}", host, port)).await?; let listener = TcpListener::bind(&format!("{}:{}", host, port)).await?;
let mut incoming = listener.incoming(); let mut incoming = listener.incoming();
let acceptor = Arc::new(TlsAcceptor::from(cfg.clone())); let acceptor = Arc::new(TlsAcceptor::from(cfg));
while let Some(Ok(stream)) = incoming.next().await { while let Some(Ok(stream)) = incoming.next().await {
let h = h.clone(); let h = h.clone();
let acceptor = acceptor.clone(); let acceptor = acceptor.clone();