src/config/*: add #[serde(skip_serializing_if="Option::is_none")] to optinal comment

This commit is contained in:
Dietmar Maurer 2020-01-13 12:14:14 +01:00
parent 454c13edce
commit 8aea35fcff
2 changed files with 2 additions and 0 deletions

View File

@ -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<String>,
pub path: String,
}

View File

@ -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<String>,
pub host: String,
pub userid: String,