Skip to content
Myr

Inline variables that used only once

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Mingun · committed by Mingun · parent 2659b94 · Browse files · 1 file+9 added−17 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−17 removed

  • other:+9 added−17 removed

1 file+9 added−17 removed

modified:serde_derive/src/de.rs+9 added-17 removed
1484 unmodified lines
1485 } else {1486 quote! { _serde::#private::de::TagContentOtherFieldVisitor }1487 };14881489 let tag_or_content = quote! {1490 #field_visitor_ty {1491 tag: #tag,1492 content: #content,1493 }1494 };14951496 let variant_seed = quote! {1497 _serde::#private::de::AdjacentlyTaggedEnumVariantSeed::<__Field> {1498 enum_name: #rust_name,1499 variants: VARIANTS,1500 fields_enum: _serde::#private::PhantomData1501 }1502 };15031489 let mut missing_content = quote! {1490 _serde::#private::Err(<__A::Error as _serde::de::Error>::missing_field(#content))1491 };1492 let mut missing_content_fallthrough = quote!();
36 unmodified lines
1529 }15301531 // Advance the map by one key, returning early in case of error.1532 let next_key = quote! {1548 _serde::de::MapAccess::next_key_seed(&mut __map, #tag_or_content)?1533 _serde::de::MapAccess::next_key_seed(&mut __map, #field_visitor_ty {1534 tag: #tag,1535 content: #content,1536 })?1537 };15381539 let variant_from_map = quote! {1552 _serde::de::MapAccess::next_value_seed(&mut __map, #variant_seed)?1540 _serde::de::MapAccess::next_value_seed(&mut __map, _serde::#private::de::AdjacentlyTaggedEnumVariantSeed::<__Field> {1541 enum_name: #rust_name,1542 variants: VARIANTS,1543 fields_enum: _serde::#private::PhantomData1544 })?1545 };15461547 // When allowing unknown fields, we want to transparently step through keys1548 // we don't care about until we find `tag`, `content`, or run out of keys.
1704 unmodified lines