File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -358,12 +358,24 @@ impl<I> Iterator for Rev<I> where I: DoubleEndedIterator {
358
358
fn next ( & mut self ) -> Option < <I as Iterator >:: Item > { self . iter . next_back ( ) }
359
359
#[ inline]
360
360
fn size_hint ( & self ) -> ( usize , Option < usize > ) { self . iter . size_hint ( ) }
361
+
362
+ fn find < P > ( & mut self , predicate : P ) -> Option < Self :: Item >
363
+ where P : FnMut ( & Self :: Item ) -> bool
364
+ {
365
+ self . iter . rfind ( predicate)
366
+ }
361
367
}
362
368
363
369
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
364
370
impl < I > DoubleEndedIterator for Rev < I > where I : DoubleEndedIterator {
365
371
#[ inline]
366
372
fn next_back ( & mut self ) -> Option < <I as Iterator >:: Item > { self . iter . next ( ) }
373
+
374
+ fn rfind < P > ( & mut self , predicate : P ) -> Option < Self :: Item >
375
+ where P : FnMut ( & Self :: Item ) -> bool
376
+ {
377
+ self . iter . find ( predicate)
378
+ }
367
379
}
368
380
369
381
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
You can’t perform that action at this time.
0 commit comments