From 323496f57612c807d654b7cc331c0b5075f364c1 Mon Sep 17 00:00:00 2001 From: Didier Date: Tue, 8 Aug 2023 02:06:31 +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(), + } + } +}