From cb7d75ff129cc41c2f3468ddbac65f9ec3e40c78 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 15 Jul 2014 08:08:03 -0700 Subject: [PATCH] Minor style --- src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6b37e8f7de..ea0af5d1b5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,10 +47,11 @@ fn main() { router.put("/me/reset_token", user::reset_token); router.get("/packages", package::index); router.get("/packages/:package_id", package::show); - - let mut m = MiddlewareBuilder::new(package::update); - m.add(conduit_json_parser::BodyReader::); - router.put("/packages/:package_id", m); + router.put("/packages/:package_id", { + let mut m = MiddlewareBuilder::new(package::update); + m.add(conduit_json_parser::BodyReader::); + m + }); let app = App::new();