trying to fix panic
This commit is contained in:
@@ -5,6 +5,7 @@ extern crate tokio;
|
||||
mod configuration;
|
||||
|
||||
use crate::configuration::Settings;
|
||||
use std::net::SocketAddr;
|
||||
use tokio::io;
|
||||
use tokio::net::TcpListener;
|
||||
use tokio::prelude::*;
|
||||
@@ -21,7 +22,7 @@ fn main() {
|
||||
println!("Listening on port {}", settings.port);
|
||||
|
||||
let addr = format!("{}:{}", settings.listen, settings.port)
|
||||
.parse()
|
||||
.parse::<SocketAddr>()
|
||||
.unwrap();
|
||||
|
||||
let listener = TcpListener::bind(&addr).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user