From 11b1c4359779b4c9a7437af53028430f8372b287 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 23 May 2018 18:27:04 -0700 Subject: rust fmt --- rust/src/bin/fatcatd.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'rust/src/bin/fatcatd.rs') diff --git a/rust/src/bin/fatcatd.rs b/rust/src/bin/fatcatd.rs index d4bc2683..53df7f71 100644 --- a/rust/src/bin/fatcatd.rs +++ b/rust/src/bin/fatcatd.rs @@ -17,8 +17,8 @@ extern crate slog_async; extern crate slog_term; use clap::{App, Arg}; -use iron::{Chain, Iron, IronResult, Response, Request, status, Url}; use iron::modifiers::RedirectRaw; +use iron::{status, Chain, Iron, IronResult, Request, Response, Url}; use iron_slog::{DefaultLogFormatter, LoggerMiddleware}; use slog::{Drain, Logger}; //use dotenv::dotenv; @@ -51,14 +51,24 @@ fn main() { fn root_handler(_: &mut Request) -> IronResult { //Ok(Response::with((status::Found, Redirect(Url::parse("/swagger-ui").unwrap())))) - Ok(Response::with((status::Found, RedirectRaw("/swagger-ui".to_string())))) + Ok(Response::with(( + status::Found, + RedirectRaw("/swagger-ui".to_string()), + ))) } fn swaggerui_handler(_: &mut Request) -> IronResult { let html_type = "text/html".parse::().unwrap(); - Ok(Response::with((html_type, status::Ok, include_str!("../../swagger-ui/index.html")))) + Ok(Response::with(( + html_type, + status::Ok, + include_str!("../../swagger-ui/index.html"), + ))) } fn yaml_handler(_: &mut Request) -> IronResult { - Ok(Response::with((status::Ok, include_str!("../../fatcat-openapi2.yml")))) + Ok(Response::with(( + status::Ok, + include_str!("../../fatcat-openapi2.yml"), + ))) } let mut chain = Chain::new(LoggerMiddleware::new(router, logger, formatter)); -- cgit v1.2.3