From 5302429e917c3370c79e21164bf77dc57e96e09a Mon Sep 17 00:00:00 2001 From: Tobias Klug Date: Mon, 26 Aug 2024 14:48:18 +0200 Subject: [PATCH] Reformat code --- infrastructure/strikes/src/put_strikes.rs | 24 ++++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/infrastructure/strikes/src/put_strikes.rs b/infrastructure/strikes/src/put_strikes.rs index 7a05783..709b2d0 100644 --- a/infrastructure/strikes/src/put_strikes.rs +++ b/infrastructure/strikes/src/put_strikes.rs @@ -7,20 +7,16 @@ async fn function_handler(request: Request) -> Result, Error> { tracing::info!("User: {:?}", user); match user { - Some(user) => { - Ok(Response::builder() - .status(200) - .header("Content-Type", "text/plain") - .body(Body::from(format!("Hello, {}!", user))) - .unwrap()) - } - None => { - Ok(Response::builder() - .status(400) - .header("Content-Type", "text/plain") - .body(Body::from("Missing user parameter")) - .unwrap()) - } + Some(user) => Ok(Response::builder() + .status(200) + .header("Content-Type", "text/plain") + .body(Body::from(format!("Hello, {}!", user))) + .unwrap()), + None => Ok(Response::builder() + .status(400) + .header("Content-Type", "text/plain") + .body(Body::from("Missing user parameter")) + .unwrap()), } }