From d9a217e3b73a702875c2907d7d1811c3dd82d8e9 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 1 Aug 2018 14:25:51 +0200 Subject: No need to be able to serialize templates. --- src/controllers/home_controller.rs | 2 +- src/controllers/posts_controller.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/home_controller.rs b/src/controllers/home_controller.rs index 6cfa736..fb88d07 100644 --- a/src/controllers/home_controller.rs +++ b/src/controllers/home_controller.rs @@ -12,7 +12,7 @@ use rocket_contrib::Json; use std::path::PathBuf; use posts_controller::ShowPostTemplate; -#[derive(BartDisplay, Serialize)] +#[derive(BartDisplay)] #[template = "templates/index.html"] struct IndexTemplate { posts: Vec diff --git a/src/controllers/posts_controller.rs b/src/controllers/posts_controller.rs index 7cc3849..7e819b5 100644 --- a/src/controllers/posts_controller.rs +++ b/src/controllers/posts_controller.rs @@ -38,7 +38,7 @@ fn create(post: Form, conn: DbConn) -> Flash { Flash::success(Redirect::to("/"), "Post successfully created!") } -#[derive(BartDisplay, Serialize)] +#[derive(BartDisplay)] #[template = "templates/show_post.html"] pub struct ShowPostTemplate { pub post: Post -- cgit v1.2.3