From 8aea35fcff9618af27228748aaaf667a8a6e3e0d Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 13 Jan 2020 12:14:14 +0100 Subject: [PATCH] src/config/*: add #[serde(skip_serializing_if="Option::is_none")] to optinal comment --- src/config/datastore.rs | 1 + src/config/remotes.rs | 1 + 2 files changed, 2 insertions(+) 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,