mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-25 20:57:55 +00:00
Move body generator for enums to its own module
Cut-paste
This commit is contained in:
@@ -4,8 +4,9 @@
|
||||
//! enum Enum {}
|
||||
//! ```
|
||||
|
||||
use crate::de::enum_;
|
||||
use crate::de::{
|
||||
deserialize_struct, deserialize_tuple, expr_is_missing, field_i, prepare_enum_variant_enum,
|
||||
deserialize_struct, deserialize_tuple, expr_is_missing, field_i,
|
||||
unwrap_to_variant_closure, wrap_deserialize_field_with, wrap_deserialize_with, Parameters,
|
||||
StructForm, TupleForm,
|
||||
};
|
||||
@@ -31,7 +32,7 @@ pub fn deserialize_externally_tagged_enum(
|
||||
let expecting = format!("enum {}", params.type_name());
|
||||
let expecting = cattrs.expecting().unwrap_or(&expecting);
|
||||
|
||||
let (variants_stmt, variant_visitor) = prepare_enum_variant_enum(variants);
|
||||
let (variants_stmt, variant_visitor) = enum_::prepare_enum_variant_enum(variants);
|
||||
|
||||
// Match arms to extract a variant from a string
|
||||
let variant_arms = variants
|
||||
|
||||
Reference in New Issue
Block a user