From 2fec4209c9a9ac208b96e261a82ee2a1945f2272 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Wed, 2 Nov 2016 18:49:06 +0100 Subject: [PATCH] Use FlashMessage in todo example. --- examples/todo/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/todo/src/main.rs b/examples/todo/src/main.rs index 9fef800e..3d3444fd 100644 --- a/examples/todo/src/main.rs +++ b/examples/todo/src/main.rs @@ -12,7 +12,7 @@ extern crate serde_json; mod static_files; mod task; -use rocket::request::Form; +use rocket::request::{Form, FlashMessage}; use rocket::response::{Flash, Redirect}; use rocket_contrib::Template; use task::Task; @@ -63,7 +63,7 @@ fn delete(id: i32) -> Result, Template> { } #[get("/")] -fn index(msg: Option>) -> Template { +fn index(msg: Option) -> Template { Template::render("index", &match msg { Some(ref msg) => Context::raw(Some((msg.name(), msg.msg()))), None => Context::raw(None),