Skip to content

Commit

Permalink
refactor: [torrust#142] replace unwrap with expect
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Jan 3, 2023
1 parent 6a9e2d5 commit 43ad94f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ pub async fn setup(config: &Configuration, tracker: Arc<tracker::Tracker>) -> Ve
if config.http_api.enabled {
// Temporarily running the new API in the 1313 port
let bind_address = config.http_api.bind_address.clone();
let mut bind_socket: SocketAddr = bind_address.parse().unwrap();
let mut bind_socket: SocketAddr = bind_address
.parse()
.expect("bind address should be a valid socket address, for example 127.0.0.1:8080");
bind_socket.set_port(1313);

let mut http_apis_config = config.http_api.clone();
Expand Down

0 comments on commit 43ad94f

Please sign in to comment.