Skip to content

Commit ce1a49d

Browse files
committed
message_iter: style
1 parent d5d84a6 commit ce1a49d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Diff for: src/message_iter.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,12 @@ impl<'a> Iterator for MessageIter<'a> {
4141
type Item = Field<'a>;
4242

4343
fn next(&mut self) -> Option<Self::Item> {
44-
match parse_field(self.data) {
45-
Ok((field, rest)) => {
44+
parse_field(self.data)
45+
.map(|(field, rest)| {
4646
self.data = rest;
47-
Some(field)
48-
},
49-
_ => None
50-
}
47+
field
48+
})
49+
.ok()
5150
}
5251
}
5352

0 commit comments

Comments
 (0)