Resolve while_let_on_iterator clippy lint
warning: this loop could be written as a `for` loop --> serde/src/private/de.rs:2905:9 | 2905 | while let Some(item) = self.iter.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for item in self.iter.by_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator = note: `#[warn(clippy::while_let_on_iterator)]` on by default
This commit is contained in:
parent
9441a29663
commit
b5a9eff32e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user