return error instead of expect()
expect() is an unwrap() with a message. use the ? macro to just return the error from main for a cleaner output
This commit is contained in:
parent
bd1429ebb6
commit
b139b6113a
1 changed files with 1 additions and 2 deletions
|
@ -54,8 +54,7 @@ fn main() -> Result<(), std::io::Error> {
|
|||
|
||||
info!("Serving files from {:?}", root);
|
||||
server::new(move || web::create_app(&root))
|
||||
.bind(&bind_addr)
|
||||
.expect(&format!("Can't listen on {} ", bind_addr))
|
||||
.bind(&bind_addr)?
|
||||
.start();
|
||||
|
||||
let _ = sys.run();
|
||||
|
|
Loading…
Add table
Reference in a new issue