From e2f342a38471b3a5099567219ea06734ddba30a9 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Mon, 9 Jan 2017 17:23:04 -0800 Subject: [PATCH] Rearrange formatting in cookies test. --- examples/cookies/src/tests.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/cookies/src/tests.rs b/examples/cookies/src/tests.rs index 12106a8b..4cce2748 100644 --- a/examples/cookies/src/tests.rs +++ b/examples/cookies/src/tests.rs @@ -45,10 +45,9 @@ fn test_index() { // Render the template with a context that contains the message. context.insert("message", "Hello from Rocket!"); - let template = Template::render("index", &context); // Test the route with the "message" cookie. - test_body(Some(Cookie::new("message".to_string(), - "Hello from Rocket!".to_string())), - template.to_string()); + let cookie = Cookie::new("message".into(), "Hello from Rocket!".into()); + let template = Template::render("index", &context); + test_body(Some(cookie), template.to_string()); }