File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
xmlity-derive/src/ser/serialize
xmlity-quick-xml/tests/other Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,12 @@ impl SerializeBuilder for DeriveEnum<'_> {
150
150
} ) ;
151
151
}
152
152
153
+ if variants. is_empty ( ) {
154
+ return Ok ( parse_quote ! {
155
+ unreachable!( "Enum {} has no variants" , stringify!( #enum_ident) )
156
+ } ) ;
157
+ }
158
+
153
159
let variants = variants
154
160
. iter ( )
155
161
. map :: < Result < Arm , DeriveError > , _ > ( |variant| {
Original file line number Diff line number Diff line change
1
+ #[ derive(
2
+ :: core:: fmt:: Debug ,
3
+ :: xmlity:: Serialize ,
4
+ :: xmlity:: Deserialize ,
5
+ :: core:: cmp:: PartialEq ,
6
+ :: core:: clone:: Clone ,
7
+ ) ]
8
+ pub enum NamespaceList { }
Original file line number Diff line number Diff line change 1
1
pub mod combined;
2
2
pub mod empty;
3
3
pub mod empty_variant;
4
+ pub mod enum_with_no_arm;
4
5
pub mod variant;
5
6
pub mod xml_value;
You can’t perform that action at this time.
0 commit comments