Rename enum_untagged::generate_variant -> deserialize_variant

This commit is contained in:
David Tolnay 2025-09-25 09:37:43 -07:00
parent 8047570160
commit 11ce4402bd
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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,