Skip to content

Commit

Permalink
Use indices for the small type
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Sep 14, 2024
1 parent f67e6bf commit 6e188dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/client/parse_flattened.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ impl<'de, S: DeserializeOwned, L: Deserialize<'de>> Visitor<'de> for FlattenedVi
})?;

let small_type = S::deserialize(MapDeserializer::new(
self.small_type_fields
.iter()
.zip(small_type_values)
.filter_map(|(&key, value)| Some((key, value?))),
small_type_values
.into_iter()
.enumerate()
.filter_map(|(index, value)| Some((index, value?))),
))
.map_err(serde::de::Error::custom)?;

Expand Down

0 comments on commit 6e188dc

Please sign in to comment.