From b59aab56f2be72352566f0afc004d7c56cd18a54 Mon Sep 17 00:00:00 2001 From: josh rotenberg Date: Tue, 8 Jun 2021 12:46:27 -0700 Subject: [PATCH] Revert "book: use non_exhaustive attribute for struct Book" This reverts commit c1b2bec7d7a56909f695f103d316453dab68798e. --- src/book/book.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/book/book.rs b/src/book/book.rs index e3d87600..b7d344b3 100644 --- a/src/book/book.rs +++ b/src/book/book.rs @@ -74,10 +74,10 @@ fn create_missing(src_dir: &Path, summary: &Summary) -> Result<()> { /// [`iter()`]: #method.iter /// [`for_each_mut()`]: #method.for_each_mut #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] -#[non_exhaustive] pub struct Book { /// The sections in this book. pub sections: Vec, + __non_exhaustive: (), } impl Book { @@ -225,7 +225,10 @@ pub(crate) fn load_book_from_disk>(summary: &Summary, src_dir: P) chapters.push(chapter); } - Ok(Book { sections: chapters }) + Ok(Book { + sections: chapters, + __non_exhaustive: (), + }) } fn load_summary_item + Clone>(