remove unnecessary moves (#740)

This commit is contained in:
samuela 2020-08-19 22:09:43 -07:00 committed by GitHub
parent 45c16acc6e
commit 368ea6f96f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,11 +26,11 @@ async fn main() {
let root_node = root_node.clone();
let ctx = db.clone();
async move {
async {
Ok::<_, hyper::Error>(service_fn(move |req| {
let root_node = root_node.clone();
let ctx = ctx.clone();
async move {
async {
match (req.method(), req.uri().path()) {
(&Method::GET, "/") => juniper_hyper::graphiql("/graphql", None).await,
(&Method::GET, "/graphql") | (&Method::POST, "/graphql") => {