mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-26 20:40:35 +00:00
Adjust variable names
This commit is contained in:
parent
dec153b8fa
commit
ad2b064b0a
@ -25,12 +25,12 @@ pub(super) fn generate_body(
|
||||
// Ignore any error associated with non-untagged deserialization so that we
|
||||
// can fall through to the untagged variants. This may be infallible so we
|
||||
// need to provide the error type.
|
||||
let tagged_frag = quote! {
|
||||
let first_attempt = quote! {
|
||||
if let _serde::#private::Result::<_, __D::Error>::Ok(__ok) = (|| #tagged_frag)() {
|
||||
return _serde::#private::Ok(__ok);
|
||||
}
|
||||
};
|
||||
enum_untagged::generate_body(params, untagged, cattrs, Some(tagged_frag))
|
||||
enum_untagged::generate_body(params, untagged, cattrs, Some(first_attempt))
|
||||
}
|
||||
None => deserialize_homogeneous_enum(params, variants, cattrs),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user