From 671590a2fa382339779482ba8d053f3b13d687c0 Mon Sep 17 00:00:00 2001 From: Raine Date: Sat, 14 Oct 2023 22:39:50 +0200 Subject: [PATCH] feat: added default for Bin so hashmap doesn't have to be specified --- manifest/src/bin.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/manifest/src/bin.rs b/manifest/src/bin.rs index f55a8e5..5142d99 100644 --- a/manifest/src/bin.rs +++ b/manifest/src/bin.rs @@ -5,5 +5,15 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Bin { pub root: String, + #[serde(default)] pub checksums: HashMap, } + +impl Default for Bin { + fn default() -> Self { + Bin { + root: String::default(), + checksums: HashMap::default(), + } + } +}