diff options
author | Sergey Golovin <golovim@gmail.com> | 2020-11-10 22:45:36 +0300 |
---|---|---|
committer | Sergey Golovin <golovim@gmail.com> | 2020-11-12 19:32:32 +0300 |
commit | 7c0ddff96affec4d04879ba793e109cffe6781fa (patch) | |
tree | 0172ba8ad9f86f8e37697e52ec9e26502e8a116e /src/config.rs | |
parent | eaa69142059c04ca14aa23ffeb1fe1469663403f (diff) |
allow to serialize the "build" section
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 5 |
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); |