explain why these won't panic
This commit is contained in:
parent
71482ffacd
commit
bd1429ebb6
1 changed files with 2 additions and 2 deletions
|
@ -39,9 +39,9 @@ fn main() -> Result<(), std::io::Error> {
|
||||||
.index(1));
|
.index(1));
|
||||||
let matches = app.get_matches();
|
let matches = app.get_matches();
|
||||||
|
|
||||||
let chdir = matches.value_of("chdir").unwrap();
|
let chdir = matches.value_of("chdir").unwrap(); // these shouldn't panic ever, since all have default_value
|
||||||
let port = matches.value_of("port").unwrap();
|
|
||||||
let addr = matches.value_of("addr").unwrap();
|
let addr = matches.value_of("addr").unwrap();
|
||||||
|
let port = matches.value_of("port").unwrap();
|
||||||
let bind_addr = format!("{}:{}", addr, port);
|
let bind_addr = format!("{}:{}", addr, port);
|
||||||
|
|
||||||
std::env::set_var("RUST_LOG", std::env::var("RUST_LOG").unwrap_or("info".to_string()));
|
std::env::set_var("RUST_LOG", std::env::var("RUST_LOG").unwrap_or("info".to_string()));
|
||||||
|
|
Loading…
Add table
Reference in a new issue