Skip to content

Commit

Permalink
Minor style
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Jul 15, 2014
1 parent 191ceda commit cb7d75f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<package::UpdateRequest>);
router.put("/packages/:package_id", m);
router.put("/packages/:package_id", {
let mut m = MiddlewareBuilder::new(package::update);
m.add(conduit_json_parser::BodyReader::<package::UpdateRequest>);
m
});

let app = App::new();

Expand Down

0 comments on commit cb7d75f

Please sign in to comment.