From 24473eaff94d2df9b1e1e218b5c350cc9fa1eb76 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 23 Oct 2022 07:43:45 +0200 Subject: [PATCH] tokio-rustls: initialize Acceptor with default() in tests (#119) --- tokio-rustls/Cargo.toml | 2 +- tokio-rustls/tests/test.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tokio-rustls/Cargo.toml b/tokio-rustls/Cargo.toml index 32a19b8..c20568c 100644 --- a/tokio-rustls/Cargo.toml +++ b/tokio-rustls/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" [dependencies] tokio = "1.0" -rustls = { version = "0.20", default-features = false } +rustls = { version = "0.20.7", default-features = false } webpki = "0.22" [features] diff --git a/tokio-rustls/tests/test.rs b/tokio-rustls/tests/test.rs index 87e77d1..9ec6360 100644 --- a/tokio-rustls/tests/test.rs +++ b/tokio-rustls/tests/test.rs @@ -176,7 +176,7 @@ async fn test_lazy_config_acceptor() -> io::Result<()> { client.read_to_end(&mut buf).await.unwrap(); }); - let acceptor = LazyConfigAcceptor::new(rustls::server::Acceptor::new().unwrap(), sstream); + let acceptor = LazyConfigAcceptor::new(rustls::server::Acceptor::default(), sstream); let start = acceptor.await.unwrap(); let ch = start.client_hello(); @@ -201,7 +201,7 @@ async fn test_lazy_config_acceptor() -> io::Result<()> { #[tokio::test] async fn lazy_config_acceptor_eof() { let buf = Cursor::new(Vec::new()); - let acceptor = LazyConfigAcceptor::new(rustls::server::Acceptor::new().unwrap(), buf); + let acceptor = LazyConfigAcceptor::new(rustls::server::Acceptor::default(), buf); let accept_result = match time::timeout(Duration::from_secs(3), acceptor).await { Ok(res) => res,