We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ExactSizeIterator
1 parent b3cd056 commit aa921b6Copy full SHA for aa921b6
src/libcore/iter.rs
@@ -749,7 +749,7 @@ pub trait ExactSizeIterator<A> : DoubleEndedIterator<A> {
749
///
750
/// If no element matches, None is returned.
751
#[inline]
752
- fn rposition(&mut self, predicate: |A| -> bool) -> Option<uint> {
+ fn rposition<P>(&mut self, mut predicate: P) -> Option<uint> where P: FnMut(A) -> bool {
753
let len = self.len();
754
for i in range(0, len).rev() {
755
if predicate(self.next_back().expect("rposition: incorrect ExactSizeIterator")) {
0 commit comments