@@ -18,8 +18,11 @@ mod tests;
18
18
///
19
19
/// [`iter()`]: #method.iter
20
20
/// [`for_each_mut()`]: #method.for_each_mut
21
+ #[ allow(
22
+ clippy:: exhaustive_structs,
23
+ reason = "This cannot be extended without breaking preprocessors."
24
+ ) ]
21
25
#[ derive( Debug , Clone , Default , PartialEq , Serialize , Deserialize ) ]
22
- #[ non_exhaustive]
23
26
pub struct Book {
24
27
/// The items in this book.
25
28
pub items : Vec < BookItem > ,
80
83
}
81
84
82
85
/// Enum representing any type of item which can be added to a book.
86
+ #[ allow(
87
+ clippy:: exhaustive_enums,
88
+ reason = "This cannot be extended without breaking preprocessors."
89
+ ) ]
83
90
#[ derive( Debug , Clone , PartialEq , Serialize , Deserialize ) ]
84
- #[ non_exhaustive]
85
91
pub enum BookItem {
86
92
/// A nested chapter.
87
93
Chapter ( Chapter ) ,
@@ -99,8 +105,11 @@ impl From<Chapter> for BookItem {
99
105
100
106
/// The representation of a "chapter", usually mapping to a single file on
101
107
/// disk however it may contain multiple sub-chapters.
108
+ #[ allow(
109
+ clippy:: exhaustive_structs,
110
+ reason = "This cannot be extended without breaking preprocessors."
111
+ ) ]
102
112
#[ derive( Debug , Clone , Default , PartialEq , Serialize , Deserialize ) ]
103
- #[ non_exhaustive]
104
113
pub struct Chapter {
105
114
/// The chapter's name.
106
115
pub name : String ,
0 commit comments