From effacf8fc8ee8aedf1a5c809dbb1b066aad7a862 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 8 Mar 2021 20:51:50 +0000 Subject: [PATCH] fix ssl test --- actix-http/tests/test_server.rs | 4 ++-- tests/test_httpserver.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actix-http/tests/test_server.rs b/actix-http/tests/test_server.rs index 910fa81f..a4c1f92b 100644 --- a/actix-http/tests/test_server.rs +++ b/actix-http/tests/test_server.rs @@ -126,7 +126,7 @@ async fn test_chunked_payload() { .take_payload() .map(|res| match res { Ok(pl) => pl, - Err(e) => panic!(format!("Error reading payload: {}", e)), + Err(e) => panic!("Error reading payload: {}", e), }) .fold(0usize, |acc, chunk| ready(acc + chunk.len())) .map(|req_size| { @@ -162,7 +162,7 @@ async fn test_chunked_payload() { let re = Regex::new(r"size=(\d+)").unwrap(); let size: usize = match re.captures(&data) { Some(caps) => caps.get(1).unwrap().as_str().parse().unwrap(), - None => panic!(format!("Failed to find size in HTTP Response: {}", data)), + None => panic!("Failed to find size in HTTP Response: {}", data), }; size }; diff --git a/tests/test_httpserver.rs b/tests/test_httpserver.rs index b6c0528d..aa2b2ca7 100644 --- a/tests/test_httpserver.rs +++ b/tests/test_httpserver.rs @@ -89,7 +89,7 @@ fn ssl_acceptor() -> SslAcceptorBuilder { builder.set_certificate(&cert).unwrap(); builder.set_private_key(&key).unwrap(); - Ok(builder) + builder } #[actix_rt::test]