diff --git a/src/config/datastore.rs b/src/config/datastore.rs index ded6ca82..1d655a72 100644 --- a/src/config/datastore.rs +++ b/src/config/datastore.rs @@ -31,6 +31,7 @@ pub const DIR_NAME_SCHEMA: Schema = StringSchema::new("Directory name").schema() #[derive(Serialize,Deserialize)] /// Datastore configuration properties. pub struct DataStoreConfig { + #[serde(skip_serializing_if="Option::is_none")] pub comment: Option, pub path: String, } diff --git a/src/config/remotes.rs b/src/config/remotes.rs index f4705c23..e2dbfc4b 100644 --- a/src/config/remotes.rs +++ b/src/config/remotes.rs @@ -40,6 +40,7 @@ pub const REMOTE_PASSWORD_SCHEMA: Schema = StringSchema::new("Password or auth t #[derive(Serialize,Deserialize)] /// Remote properties. pub struct Remote { + #[serde(skip_serializing_if="Option::is_none")] pub comment: Option, pub host: String, pub userid: String,