1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 14:49:20 +02:00

revert generic service request; add ServerConfig to service factories

This commit is contained in:
Nikolay Kim
2019-03-09 07:37:23 -08:00
parent e324522389
commit ca73f178c9
21 changed files with 222 additions and 139 deletions

View File

@ -56,7 +56,8 @@ impl TestServer {
pub fn new<F: StreamServiceFactory>(
factory: F,
) -> TestServerRuntime<
impl Service<Connect, Response = impl Connection, Error = ConnectorError> + Clone,
impl Service<Request = Connect, Response = impl Connection, Error = ConnectorError>
+ Clone,
> {
let (tx, rx) = mpsc::channel();
@ -88,8 +89,11 @@ impl TestServer {
}
fn new_connector(
) -> impl Service<Connect, Response = impl Connection, Error = ConnectorError> + Clone
{
) -> impl Service<
Request = Connect,
Response = impl Connection,
Error = ConnectorError,
> + Clone {
#[cfg(feature = "ssl")]
{
use openssl::ssl::{SslConnector, SslMethod, SslVerifyMode};
@ -202,7 +206,7 @@ impl<T> TestServerRuntime<T> {
impl<T> TestServerRuntime<T>
where
T: Service<Connect, Error = ConnectorError> + Clone,
T: Service<Request = Connect, Error = ConnectorError> + Clone,
T::Response: Connection,
{
/// Connect to websocket server at a given path