mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-27 04:50:36 +00:00
Rename enum_untagged::generate_variant -> deserialize_variant
This commit is contained in:
parent
8047570160
commit
11ce4402bd
@ -38,7 +38,7 @@ pub(super) fn deserialize(
|
||||
.map(|(i, variant)| {
|
||||
let variant_index = field_i(i);
|
||||
|
||||
let block = Match(enum_untagged::generate_variant(params, variant, cattrs));
|
||||
let block = Match(enum_untagged::deserialize_variant(params, variant, cattrs));
|
||||
|
||||
quote! {
|
||||
__Field::#variant_index => #block
|
||||
|
@ -28,7 +28,7 @@ pub(super) fn deserialize(
|
||||
let attempts = variants
|
||||
.iter()
|
||||
.filter(|variant| !variant.attrs.skip_deserializing())
|
||||
.map(|variant| Expr(generate_variant(params, variant, cattrs)));
|
||||
.map(|variant| Expr(deserialize_variant(params, variant, cattrs)));
|
||||
// TODO this message could be better by saving the errors from the failed
|
||||
// attempts. The heuristic used by TOML was to count the number of fields
|
||||
// processed before an error, and use the error that happened after the
|
||||
@ -59,7 +59,7 @@ pub(super) fn deserialize(
|
||||
}
|
||||
|
||||
// Also used by adjacently tagged enums
|
||||
pub(super) fn generate_variant(
|
||||
pub(super) fn deserialize_variant(
|
||||
params: &Parameters,
|
||||
variant: &Variant,
|
||||
cattrs: &attr::Container,
|
||||
|
Loading…
x
Reference in New Issue
Block a user