Skip to content

Commit

Permalink
refactor: simplify listen() call
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Jan 31, 2024
1 parent 20d7572 commit eaf89f8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ pub async fn start(state: State, server: String, port: u16) -> Result<()> {
app.at("/").get(|_| async { Ok("Hello, world!") });
app.at("/register").post(register_device);

let addr = format!("{}:{}", server, port);
info!("Listening on {}", &addr);
app.listen(addr).await?;
info!("Listening on {server}:port");
app.listen((server, port)).await?;
Ok(())
}

Expand Down

0 comments on commit eaf89f8

Please sign in to comment.