diff options
-rw-r--r-- | src/schema.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/schema.rs b/src/schema.rs index eae60af..81bfc1b 100644 --- a/src/schema.rs +++ b/src/schema.rs | |||
@@ -34,7 +34,7 @@ fn block_parser(path: String) -> u64 { | |||
34 | fn last_block_content() -> Option<String> { | 34 | fn last_block_content() -> Option<String> { |
35 | let blocks = read_block_name().unwrap(); | 35 | let blocks = read_block_name().unwrap(); |
36 | 36 | ||
37 | if blocks.len() == 0 { | 37 | if blocks.is_empty() { |
38 | return None; | 38 | return None; |
39 | } | 39 | } |
40 | 40 | ||
@@ -173,6 +173,12 @@ impl Db { | |||
173 | } | 173 | } |
174 | } | 174 | } |
175 | 175 | ||
176 | impl Default for Db { | ||
177 | fn default() -> Self { | ||
178 | Self::new() | ||
179 | } | ||
180 | } | ||
181 | |||
176 | /// A transaction between `source` and `target` that moves `amount` | 182 | /// A transaction between `source` and `target` that moves `amount` |
177 | #[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] | 183 | #[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] |
178 | pub struct Transaction { | 184 | pub struct Transaction { |