mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
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:
+1
-1
@@ -23,7 +23,7 @@ fn main() {
|
|||||||
let handle = l.handle();
|
let handle = l.handle();
|
||||||
|
|
||||||
// Create a TCP listener which will listen for incoming connections
|
// 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
|
// Once we've got the TCP listener, inform that we have it
|
||||||
println!("Listening on: {}", addr);
|
println!("Listening on: {}", addr);
|
||||||
|
|||||||
Reference in New Issue
Block a user