Skip to content

Commit 3c10b00

Browse files
committed
Skip serializing of the multilingual field
This skips serializing of the multilingual field since it is unused, and we plan to remove it in the future. This helps avoid it showing up in `mdbook init`.
1 parent c9ddb4d commit 3c10b00

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@ pub struct BookConfig {
421421
/// Location of the book source relative to the book's root directory.
422422
pub src: PathBuf,
423423
/// Does this book support more than one language?
424+
// TODO: Remove this field in 0.5, it is unused:
425+
// https://github.com/rust-lang/mdBook/issues/2636
426+
#[serde(skip_serializing)]
424427
pub multilingual: bool,
425428
/// The main language of the book.
426429
pub language: Option<String>,

tests/testsuite/init.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ All done, no errors...
2828
[book]
2929
authors = []
3030
language = "en"
31-
multilingual = false
3231
src = "src"
3332
3433
"#]],
@@ -95,7 +94,6 @@ All done, no errors...
9594
[book]
9695
authors = []
9796
language = "en"
98-
multilingual = false
9997
src = "src"
10098
10199
"#]],
@@ -129,7 +127,6 @@ All done, no errors...
129127
[book]
130128
authors = []
131129
language = "en"
132-
multilingual = false
133130
src = "src"
134131
title = "Example title"
135132
@@ -182,7 +179,6 @@ fn init_with_custom_book_and_src_locations() {
182179
[book]
183180
authors = []
184181
language = "en"
185-
multilingual = false
186182
src = "in"
187183
188184
[build]

tests/testsuite/renderer.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ fn backends_receive_render_context_via_stdin() {
188188
"book": {
189189
"authors": [],
190190
"language": "en",
191-
"multilingual": false,
192191
"src": "src"
193192
},
194193
"output": {

0 commit comments

Comments
 (0)