refmt server network

This commit is contained in:
CodeSteak 2019-04-25 23:37:53 +02:00
parent 8cbee2fcc5
commit 25b05d90fa
2 changed files with 19 additions and 19 deletions

View File

@ -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)?;