From 5d6502b2b28a26bf7815e2eeb65695d330149758 Mon Sep 17 00:00:00 2001 From: Fauconfan Date: Tue, 12 Jul 2022 12:11:08 +0200 Subject: [PATCH] add non_exhaustive attribute on Theme, Chapter --- src/book/book.rs | 1 + src/theme/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/book/book.rs b/src/book/book.rs index 34c42fa5..870becad 100644 --- a/src/book/book.rs +++ b/src/book/book.rs @@ -152,6 +152,7 @@ impl From for BookItem { /// The representation of a "chapter", usually mapping to a single file on /// disk however it may contain multiple sub-chapters. #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] +#[non_exhaustive] pub struct Chapter { /// The chapter's name. pub name: String, diff --git a/src/theme/mod.rs b/src/theme/mod.rs index a1ee18af..6555ef8a 100644 --- a/src/theme/mod.rs +++ b/src/theme/mod.rs @@ -45,6 +45,7 @@ pub static FONT_AWESOME_OTF: &[u8] = include_bytes!("FontAwesome/fonts/FontAweso /// You should only ever use the static variables directly if you want to /// override the user's theme with the defaults. #[derive(Debug, PartialEq)] +#[non_exhaustive] pub struct Theme { pub index: Vec, pub head: Vec,