Yield only body fields from RequestBodyFields.
This commit is contained in:
parent
3893ab0022
commit
f624e1ff50
@ -161,10 +161,14 @@ impl<'a> Iterator for RequestBodyFields<'a> {
|
||||
type Item = &'a RequestField;
|
||||
|
||||
fn next(&mut self) -> Option<&'a RequestField> {
|
||||
let value = self.fields.get(self.index);
|
||||
|
||||
while let Some(value) = self.fields.get(self.index) {
|
||||
self.index += 1;
|
||||
|
||||
value
|
||||
if value.is_body() {
|
||||
return Some(value);
|
||||
}
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user