Skip to content

Commit

Permalink
tokio-rustls: initialize Acceptor with default() in tests (hyperium#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
djc authored Oct 23, 2022
1 parent c033514 commit 24473ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tokio-rustls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions tokio-rustls/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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,
Expand Down

0 comments on commit 24473ea

Please sign in to comment.