Skip to content

Commit 49879e9

Browse files
authored
Implement IntoIterator for Statuses (#880)
1 parent 3e0a613 commit 49879e9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: src/status.rs

+8
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@ impl<'a> DoubleEndedIterator for StatusIter<'a> {
305305
}
306306
impl<'a> ExactSizeIterator for StatusIter<'a> {}
307307

308+
impl<'a> IntoIterator for &'a Statuses<'a> {
309+
type Item = StatusEntry<'a>;
310+
type IntoIter = StatusIter<'a>;
311+
fn into_iter(self) -> Self::IntoIter {
312+
self.iter()
313+
}
314+
}
315+
308316
impl<'statuses> StatusEntry<'statuses> {
309317
/// Access the bytes for this entry's corresponding pathname
310318
pub fn path_bytes(&self) -> &[u8] {

0 commit comments

Comments
 (0)