From bd1429ebb6f62c417b3b67a29f4f387eef013714 Mon Sep 17 00:00:00 2001 From: Damjan Georgievski Date: Sun, 22 Jul 2018 17:09:53 +0200 Subject: [PATCH] explain why these won't panic --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 54ea688..f47f78e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,9 +39,9 @@ fn main() -> Result<(), std::io::Error> { .index(1)); let matches = app.get_matches(); - let chdir = matches.value_of("chdir").unwrap(); - let port = matches.value_of("port").unwrap(); + let chdir = matches.value_of("chdir").unwrap(); // these shouldn't panic ever, since all have default_value let addr = matches.value_of("addr").unwrap(); + let port = matches.value_of("port").unwrap(); let bind_addr = format!("{}:{}", addr, port); std::env::set_var("RUST_LOG", std::env::var("RUST_LOG").unwrap_or("info".to_string()));