From 368ea6f96f375e03d596cb848975264662e28ba2 Mon Sep 17 00:00:00 2001 From: samuela Date: Wed, 19 Aug 2020 22:09:43 -0700 Subject: [PATCH] remove unnecessary moves (#740) --- juniper_hyper/examples/hyper_server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/juniper_hyper/examples/hyper_server.rs b/juniper_hyper/examples/hyper_server.rs index ece4d368..58836986 100644 --- a/juniper_hyper/examples/hyper_server.rs +++ b/juniper_hyper/examples/hyper_server.rs @@ -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") => {