diff --git a/serde_derive/src/de/enum_adjacently.rs b/serde_derive/src/de/enum_adjacently.rs index 58ed47b7..467cfc0d 100644 --- a/serde_derive/src/de/enum_adjacently.rs +++ b/serde_derive/src/de/enum_adjacently.rs @@ -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 diff --git a/serde_derive/src/de/enum_untagged.rs b/serde_derive/src/de/enum_untagged.rs index 5a0fb178..9118ad60 100644 --- a/serde_derive/src/de/enum_untagged.rs +++ b/serde_derive/src/de/enum_untagged.rs @@ -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,