diff --git a/src/book/book.rs b/src/book/book.rs index 048aef28..ae64b120 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 { @@ -228,10 +228,7 @@ pub(crate) fn load_book_from_disk>(summary: &Summary, src_dir: P) chapters.push(chapter); } - Ok(Book { - sections: chapters, - __non_exhaustive: (), - }) + Ok(Book { sections: chapters }) } fn load_summary_item + Clone>(