summaryrefslogtreecommitdiff
path: root/test_util/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'test_util/src/lib.rs')
-rw-r--r--test_util/src/lib.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs
index c4789621f..555ba5271 100644
--- a/test_util/src/lib.rs
+++ b/test_util/src/lib.rs
@@ -11,10 +11,8 @@ use regex::Regex;
use serde::Serialize;
use std::collections::HashMap;
use std::env;
-use std::io;
use std::io::Write;
use std::path::PathBuf;
-use std::pin::Pin;
use std::process::Child;
use std::process::Command;
use std::process::Output;
@@ -22,8 +20,6 @@ use std::process::Stdio;
use std::result::Result;
use std::sync::Mutex;
use std::sync::MutexGuard;
-use std::task::Context;
-use std::task::Poll;
use tokio::net::TcpStream;
use url::Url;
@@ -201,29 +197,6 @@ async fn get_tcp_listener_stream(
futures::stream::select_all(listeners)
}
-/// Taken from example in https://github.com/ctz/hyper-rustls/blob/a02ef72a227dcdf102f86e905baa7415c992e8b3/examples/server.rs
-struct HyperAcceptor<'a> {
- acceptor: Pin<
- Box<dyn Stream<Item = io::Result<rustls_tokio_stream::TlsStream>> + 'a>,
- >,
-}
-
-impl hyper::server::accept::Accept for HyperAcceptor<'_> {
- type Conn = rustls_tokio_stream::TlsStream;
- type Error = io::Error;
-
- fn poll_accept(
- mut self: Pin<&mut Self>,
- cx: &mut Context,
- ) -> Poll<Option<Result<Self::Conn, Self::Error>>> {
- Pin::new(&mut self.acceptor).poll_next(cx)
- }
-}
-
-#[allow(clippy::non_send_fields_in_send_ty)]
-// SAFETY: unsafe trait must have unsafe implementation
-unsafe impl std::marker::Send for HyperAcceptor<'_> {}
-
#[derive(Default)]
struct HttpServerCount {
count: usize,