add non_exhaustive attribute on Theme, Chapter

This commit is contained in:
Fauconfan 2022-07-12 12:11:08 +02:00
parent bdd6ea1826
commit 5d6502b2b2
2 changed files with 2 additions and 0 deletions

View File

@ -152,6 +152,7 @@ impl From<Chapter> for BookItem {
/// The representation of a "chapter", usually mapping to a single file on /// The representation of a "chapter", usually mapping to a single file on
/// disk however it may contain multiple sub-chapters. /// disk however it may contain multiple sub-chapters.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct Chapter { pub struct Chapter {
/// The chapter's name. /// The chapter's name.
pub name: String, pub name: String,

View File

@ -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 /// You should only ever use the static variables directly if you want to
/// override the user's theme with the defaults. /// override the user's theme with the defaults.
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
#[non_exhaustive]
pub struct Theme { pub struct Theme {
pub index: Vec<u8>, pub index: Vec<u8>,
pub head: Vec<u8>, pub head: Vec<u8>,