feat: added default for Bin so hashmap doesn't have to be specified

This commit is contained in:
Didier Slof 2023-08-08 02:06:31 +02:00
parent cd59b6463a
commit 323496f576
Signed by: didier
GPG key ID: 01E71F18AA4398E5

View file

@ -5,5 +5,15 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Bin { pub struct Bin {
pub root: String, pub root: String,
#[serde(default)]
pub checksums: HashMap<String, String>, pub checksums: HashMap<String, String>,
} }
impl Default for Bin {
fn default() -> Self {
Bin {
root: String::default(),
checksums: HashMap::default(),
}
}
}