summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergey Golovin <golovim@gmail.com>2020-11-10 22:45:36 +0300
committerSergey Golovin <golovim@gmail.com>2020-11-12 19:32:32 +0300
commit7c0ddff96affec4d04879ba793e109cffe6781fa (patch)
tree0172ba8ad9f86f8e37697e52ec9e26502e8a116e /src
parenteaa69142059c04ca14aa23ffeb1fe1469663403f (diff)
allow to serialize the "build" section
Diffstat (limited to 'src')
-rw-r--r--src/config.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 91d40300..14a13ce3 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -352,6 +352,11 @@ impl Serialize for Config {
let book_config = Value::try_from(&self.book).expect("should always be serializable");
table.insert("book", book_config);
+ if self.build != BuildConfig::default() {
+ let build_config = Value::try_from(&self.build).expect("should always be serializable");
+ table.insert("build", build_config);
+ }
+
if self.rust != RustConfig::default() {
let rust_config = Value::try_from(&self.rust).expect("should always be serializable");
table.insert("rust", rust_config);