aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2017-11-21 12:04:37 +0100
committerHarald Eilertsen <haraldei@anduin.net>2017-11-21 12:04:37 +0100
commitf6b3c1a3a1fd1eddeb7e87262d56ae9dbdb47ac1 (patch)
treefbc914bcca14b05548596bea056328bbb54846b8 /src
parentc65b9e00d5d37722e7e4887e7165e19931048c83 (diff)
downloadrocket-blog-f6b3c1a3a1fd1eddeb7e87262d56ae9dbdb47ac1.tar.gz
rocket-blog-f6b3c1a3a1fd1eddeb7e87262d56ae9dbdb47ac1.tar.bz2
rocket-blog-f6b3c1a3a1fd1eddeb7e87262d56ae9dbdb47ac1.zip
Implement default trait for Posts using derive.
Diffstat (limited to 'src')
-rw-r--r--src/models.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/models.rs b/src/models.rs
index bebb321..a0152c0 100644
--- a/src/models.rs
+++ b/src/models.rs
@@ -1,4 +1,4 @@
-#[derive(Serialize, Queryable)]
+#[derive(Default, Serialize, Queryable)]
pub struct Post {
pub id: i32,
pub title: String,