diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2017-11-21 12:04:37 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2017-11-21 12:04:37 +0100 |
commit | f6b3c1a3a1fd1eddeb7e87262d56ae9dbdb47ac1 (patch) | |
tree | fbc914bcca14b05548596bea056328bbb54846b8 | |
parent | c65b9e00d5d37722e7e4887e7165e19931048c83 (diff) | |
download | rocket-blog-f6b3c1a3a1fd1eddeb7e87262d56ae9dbdb47ac1.tar.gz rocket-blog-f6b3c1a3a1fd1eddeb7e87262d56ae9dbdb47ac1.tar.bz2 rocket-blog-f6b3c1a3a1fd1eddeb7e87262d56ae9dbdb47ac1.zip |
Implement default trait for Posts using derive.
-rw-r--r-- | src/models.rs | 2 |
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, |