Skip to content

Commit

Permalink
feat: implement IntoIter for owned body
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgehermo9 authored and hillu committed Oct 21, 2024
1 parent 0edafde commit 8b82c43
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,11 @@ impl<'a> IntoIterator for &'a Body<'a> {
self.elems.iter()
}
}

impl<'a> IntoIterator for Body<'a> {
type Item = (Key, Value<'a>);
type IntoIter = std::vec::IntoIter<(Key, Value<'a>)>;
fn into_iter(self) -> Self::IntoIter {
self.elems.into_iter()
}
}

0 comments on commit 8b82c43

Please sign in to comment.