From f6b3c1a3a1fd1eddeb7e87262d56ae9dbdb47ac1 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Tue, 21 Nov 2017 12:04:37 +0100 Subject: Implement default trait for Posts using derive. --- src/models.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- cgit v1.2.3