move to Makefile
This commit is contained in:
@ -20,9 +20,7 @@ struct Args {
|
||||
async fn main() -> Result<(), std::io::Error> {
|
||||
let args = Args::parse();
|
||||
let str_address = format!("{}:{}", args.host, args.port);
|
||||
let address: SocketAddr = str_address
|
||||
.parse()
|
||||
.unwrap_or_else(|_| panic!("could not parse address: {str_address}"));
|
||||
let address: SocketAddr = str_address.parse().unwrap(); // _or_else(|_| panic!("could not parse address: {str_address}"));
|
||||
let listener = tokio::net::TcpListener::bind(address).await?;
|
||||
let result = run(listener)?.await;
|
||||
event!(Level::INFO, "Server stopped");
|
||||
|
||||
Reference in New Issue
Block a user