mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-28 21:10:37 +02:00
Use associated type for NewService config
This commit is contained in:
@ -19,11 +19,11 @@ use tokio_tcp::TcpStream;
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use actix_service::{fn_service, IntoNewService};
|
||||
/// use actix_service::{service_fn, IntoNewService};
|
||||
/// use actix_test_server::TestServer;
|
||||
///
|
||||
/// fn main() {
|
||||
/// let srv = TestServer::with(|| fn_service(
|
||||
/// let srv = TestServer::with(|| service_fn(
|
||||
/// |sock| {
|
||||
/// println!("New connection: {:?}", sock);
|
||||
/// Ok::<_, ()>(())
|
||||
|
Reference in New Issue
Block a user