diff --git a/serde/src/private/de.rs b/serde/src/private/de.rs index 35fb6a0a7..8aab9d1d5 100644 --- a/serde/src/private/de.rs +++ b/serde/src/private/de.rs @@ -2902,7 +2902,7 @@ where where T: DeserializeSeed<'de>, { - while let Some(item) = self.iter.next() { + for item in self.iter.by_ref() { if let Some((key, content)) = use_item(item, self.fields) { self.pending_content = Some(content); return seed.deserialize(ContentDeserializer::new(key)).map(Some);