add default values to config struct

This commit is contained in:
Sebastian Hugentobler 2017-03-22 09:40:48 +01:00
parent 88827749db
commit d538536af8

View File

@ -32,7 +32,9 @@ fn timestamp() -> i64 {
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct Config { pub struct Config {
#[serde(default)]
pub storage: String, pub storage: String,
#[serde(default)]
pub movie_storage: String, pub movie_storage: String,
#[serde(default = "default_map")] #[serde(default = "default_map")]
pub games: HashMap<String, u64>, pub games: HashMap<String, u64>,