Instead of calling handle() a second time in line 26, I used a reference to the value obtained in line 23.

This commit is contained in:
xenor 2016-09-19 17:45:58 +02:00 committed by Carl Lerche
parent 418a973520
commit f41c55f9f7

View File

@ -23,7 +23,7 @@ fn main() {
let handle = l.handle();
// Create a TCP listener which will listen for incoming connections
let socket = TcpListener::bind(&addr, &l.handle()).unwrap();
let socket = TcpListener::bind(&addr, &handle).unwrap();
// Once we've got the TCP listener, inform that we have it
println!("Listening on: {}", addr);