From a23ff4ac215ff06ff62b053d1704439b7cc47def Mon Sep 17 00:00:00 2001 From: Zach Kirlew Date: Sun, 10 Mar 2024 08:56:02 +0000 Subject: [PATCH] Formatting --- src/lib.rs | 9 +++------ tests/healthcheck.rs | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 20e014b..b9d3c82 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,16 +1,13 @@ -use actix_web::{web, App, HttpServer, Responder, HttpResponse}; use actix_web::dev::Server; +use actix_web::{web, App, HttpResponse, HttpServer, Responder}; async fn healthcheck() -> impl Responder { HttpResponse::Ok() } pub fn run() -> Result { - let server = HttpServer::new(|| { - App::new() - .route("/health-check", web::get().to(healthcheck)) - }) + let server = HttpServer::new(|| App::new().route("/health-check", web::get().to(healthcheck))) .bind("127.0.0.1:8000")? .run(); Ok(server) -} \ No newline at end of file +} diff --git a/tests/healthcheck.rs b/tests/healthcheck.rs index 4478fbe..526c4b6 100644 --- a/tests/healthcheck.rs +++ b/tests/healthcheck.rs @@ -22,4 +22,4 @@ async fn health_check_works() { fn spawn_app() { let server = email_newsletter_api::run().expect("Failed to bind address"); let _ = tokio::spawn(server); -} \ No newline at end of file +}