Skip to content
This repository was archived by the owner on Jun 9, 2022. It is now read-only.

Commit a554233

Browse files
committed
Cargo fmt
1 parent 153630d commit a554233

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/main.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ mod sql;
99
use clap::Clap;
1010
use environment::Environment;
1111
use helpers::problem;
12-
use std::net::SocketAddr;
13-
use warp::Filter;
1412
use hyper::server::Server;
1513
use listenfd::ListenFd;
1614
use std::convert::Infallible;
15+
use std::net::SocketAddr;
16+
use warp::Filter;
1717

1818
#[derive(Clap, Debug)]
1919
#[clap(
@@ -61,9 +61,7 @@ async fn main() -> anyhow::Result<()> {
6161
.allow_any_origin()
6262
.build();
6363
let log = warp::log("api::request");
64-
let status = warp::get()
65-
.and(warp::path("status"))
66-
.map(|| format!("OK"));
64+
let status = warp::get().and(warp::path("status")).map(|| format!("OK"));
6765
let auth = warp::post()
6866
.and(warp::path("auth"))
6967
.and(env.clone())
@@ -148,19 +146,18 @@ async fn main() -> anyhow::Result<()> {
148146
};
149147

150148
let svc = warp::service(
151-
auth.or(status).or(graphql)
149+
auth.or(status)
150+
.or(graphql)
152151
.recover(problem::unpack)
153152
.with(cors)
154153
.with(log),
155154
);
156155

157-
158156
let make_svc = hyper::service::make_service_fn(|_: _| {
159157
let svc = svc.clone();
160158
async move { Ok::<_, Infallible>(svc) }
161159
});
162160

163-
164161
let mut listenfd = ListenFd::from_env();
165162

166163
let server = if let Some(l) = listenfd.take_tcp_listener(0).unwrap() {

0 commit comments

Comments
 (0)