diff options
author | Eric Huss <eric@huss.org> | 2020-11-12 10:41:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-12 10:41:12 -0800 |
commit | 552e3378cf22e9011b32cd1c3a7740f13b7eb14a (patch) | |
tree | 36c442fdf87a6b4f013ce505b0aca1beafc921d1 /src | |
parent | 07e72757d3d6fa3584edde869866da09a30b8138 (diff) | |
parent | 7c0ddff96affec4d04879ba793e109cffe6781fa (diff) |
Merge pull request #1378 from daynin/serialize-build-section
allow to serialize the "build" section
Diffstat (limited to 'src')
-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); |