Implement last on the GroupBy and GroupByMut Iterators
This commit is contained in:
parent
e16eaeaa11
commit
005912fce8
@ -3018,6 +3018,11 @@ where P: FnMut(&T, &T) -> bool,
|
||||
(1, Some(self.slice.len()))
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn last(self) -> Option<Self::Item> {
|
||||
self.next_back()
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
@ -3098,6 +3103,11 @@ where P: FnMut(&T, &T) -> bool,
|
||||
(1, Some(self.slice.len()))
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn last(self) -> Option<Self::Item> {
|
||||
self.next_back()
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user