mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
body ergonomics v3 (#2468)
This commit is contained in:
@ -31,7 +31,7 @@ extern crate tls_openssl as openssl;
|
||||
#[cfg(feature = "rustls")]
|
||||
extern crate tls_rustls as rustls;
|
||||
|
||||
use std::{error::Error as StdError, fmt, net, thread, time::Duration};
|
||||
use std::{fmt, net, thread, time::Duration};
|
||||
|
||||
use actix_codec::{AsyncRead, AsyncWrite, Framed};
|
||||
pub use actix_http::test::TestBuffer;
|
||||
@ -41,7 +41,8 @@ use actix_http::{
|
||||
};
|
||||
use actix_service::{map_config, IntoServiceFactory, ServiceFactory, ServiceFactoryExt as _};
|
||||
use actix_web::{
|
||||
dev::{AppConfig, MessageBody, Server, ServerHandle, Service},
|
||||
body::MessageBody,
|
||||
dev::{AppConfig, Server, ServerHandle, Service},
|
||||
rt::{self, System},
|
||||
web, Error,
|
||||
};
|
||||
@ -88,7 +89,6 @@ where
|
||||
S::Response: Into<Response<B>> + 'static,
|
||||
<S::Service as Service<Request>>::Future: 'static,
|
||||
B: MessageBody + 'static,
|
||||
B::Error: Into<Box<dyn StdError>>,
|
||||
{
|
||||
start_with(TestServerConfig::default(), factory)
|
||||
}
|
||||
@ -128,7 +128,6 @@ where
|
||||
S::Response: Into<Response<B>> + 'static,
|
||||
<S::Service as Service<Request>>::Future: 'static,
|
||||
B: MessageBody + 'static,
|
||||
B::Error: Into<Box<dyn StdError>>,
|
||||
{
|
||||
// for sending handles and server info back from the spawned thread
|
||||
let (started_tx, started_rx) = std::sync::mpsc::channel();
|
||||
|
Reference in New Issue
Block a user