diff options
Diffstat (limited to 'atuin-server')
-rw-r--r-- | atuin-server/src/lib.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/atuin-server/src/lib.rs b/atuin-server/src/lib.rs index 007ad5c92..6778b099f 100644 --- a/atuin-server/src/lib.rs +++ b/atuin-server/src/lib.rs @@ -1,9 +1,6 @@ #![forbid(unsafe_code)] -use std::{ - future::Future, - net::{IpAddr, SocketAddr, TcpListener}, -}; +use std::{future::Future, net::TcpListener}; use atuin_server_database::Database; use axum::Server; @@ -43,13 +40,12 @@ async fn shutdown_signal() { pub async fn launch<Db: Database>( settings: Settings<Db::Settings>, - host: String, + host: &str, port: u16, ) -> Result<()> { - let host = host.parse::<IpAddr>()?; launch_with_listener::<Db>( settings, - TcpListener::bind(SocketAddr::new(host, port)).context("could not connect to socket")?, + TcpListener::bind((host, port)).context("could not connect to socket")?, shutdown_signal(), ) .await |