From 1fdf73c6f8484b2894c5c53196ebb70e0b9c3bfc Mon Sep 17 00:00:00 2001 From: p11 Date: Sun, 16 Jul 2023 16:45:31 +0200 Subject: [PATCH] Expect insetad of unwrap for initialization --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f1368df..455b019 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,7 @@ fn main() { let mut args = env::args(); args.next(); let address = args.next().unwrap_or("127.0.0.1:8080".to_string()); - let listener = TcpListener::bind(address).unwrap(); + let listener = TcpListener::bind(address).expect("Invalid bind address!"); eprintln!("Strated server!"); for stream in listener.incoming() {