refmt server network
This commit is contained in:
parent
8cbee2fcc5
commit
25b05d90fa
@ -7,7 +7,7 @@ use std::time::Duration;
|
||||
use super::*;
|
||||
|
||||
pub fn listen_forever<H>(handler: H, config: &ProtocolConfig) -> io::Result<()>
|
||||
where
|
||||
where
|
||||
H: 'static + ProtocolHandler + Sized,
|
||||
{
|
||||
let listener = TcpListener::bind((config.listen_addr.as_str(), config.port))?;
|
||||
@ -29,7 +29,7 @@ pub fn listen_forever<H>(handler: H, config: &ProtocolConfig) -> io::Result<()>
|
||||
}
|
||||
|
||||
fn client_loop<H>(connection: TcpStream, mut handler: H) -> io::Result<()>
|
||||
where
|
||||
where
|
||||
H: 'static + ProtocolHandler + Sized,
|
||||
{
|
||||
let mut connection = Connection::from_tcp(connection)?;
|
||||
|
Loading…
Reference in New Issue
Block a user