aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-08-01 14:25:51 +0200
committerHarald Eilertsen <haraldei@anduin.net>2018-08-01 19:40:57 +0200
commitd9a217e3b73a702875c2907d7d1811c3dd82d8e9 (patch)
tree0031a2d81285192c8064e073802bbbb2e4f3802f /src
parent7633b869d0ca0772f73c687023e299d7ce7e4b52 (diff)
downloadrocket-blog-d9a217e3b73a702875c2907d7d1811c3dd82d8e9.tar.gz
rocket-blog-d9a217e3b73a702875c2907d7d1811c3dd82d8e9.tar.bz2
rocket-blog-d9a217e3b73a702875c2907d7d1811c3dd82d8e9.zip
No need to be able to serialize templates.
Diffstat (limited to 'src')
-rw-r--r--src/controllers/home_controller.rs2
-rw-r--r--src/controllers/posts_controller.rs2
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<ShowPostTemplate>
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<NewPost>, conn: DbConn) -> Flash<Redirect> {
Flash::success(Redirect::to("/"), "Post successfully created!")
}
-#[derive(BartDisplay, Serialize)]
+#[derive(BartDisplay)]
#[template = "templates/show_post.html"]
pub struct ShowPostTemplate {
pub post: Post