Eliminate loop that does not loop
This commit is contained in:
parent
30824e9f61
commit
ab62cd3b28
@ -2819,16 +2819,18 @@ where
|
|||||||
where
|
where
|
||||||
T: DeserializeSeed<'de>,
|
T: DeserializeSeed<'de>,
|
||||||
{
|
{
|
||||||
while let Some(item) = self.iter.next() {
|
match self.iter.next() {
|
||||||
|
Some(item) => {
|
||||||
// Do not take(), instead borrow this entry. The internally tagged
|
// Do not take(), instead borrow this entry. The internally tagged
|
||||||
// enum does its own buffering so we can't tell whether this entry
|
// enum does its own buffering so we can't tell whether this entry
|
||||||
// is going to be consumed. Borrowing here leaves the entry
|
// is going to be consumed. Borrowing here leaves the entry
|
||||||
// available for later flattened fields.
|
// available for later flattened fields.
|
||||||
let (ref key, ref content) = *item.as_ref().unwrap();
|
let (ref key, ref content) = *item.as_ref().unwrap();
|
||||||
self.pending = Some(content);
|
self.pending = Some(content);
|
||||||
return seed.deserialize(ContentRefDeserializer::new(key)).map(Some);
|
seed.deserialize(ContentRefDeserializer::new(key)).map(Some)
|
||||||
|
}
|
||||||
|
None => Ok(None),
|
||||||
}
|
}
|
||||||
Ok(None)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn next_value_seed<T>(&mut self, seed: T) -> Result<T::Value, Self::Error>
|
fn next_value_seed<T>(&mut self, seed: T) -> Result<T::Value, Self::Error>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user