File tree 1 file changed +38
-0
lines changed 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -710,6 +710,37 @@ impl<'a> Iterator for Bytes<'a> {
710
710
fn nth ( & mut self , n : usize ) -> Option < Self :: Item > {
711
711
self . 0 . nth ( n)
712
712
}
713
+
714
+ #[ inline]
715
+ fn all < F > ( & mut self , f : F ) -> bool where F : FnMut ( Self :: Item ) -> bool {
716
+ self . 0 . all ( f)
717
+ }
718
+
719
+ #[ inline]
720
+ fn any < F > ( & mut self , f : F ) -> bool where F : FnMut ( Self :: Item ) -> bool {
721
+ self . 0 . any ( f)
722
+ }
723
+
724
+ #[ inline]
725
+ fn find < P > ( & mut self , predicate : P ) -> Option < Self :: Item > where
726
+ P : FnMut ( & Self :: Item ) -> bool
727
+ {
728
+ self . 0 . find ( predicate)
729
+ }
730
+
731
+ #[ inline]
732
+ fn position < P > ( & mut self , predicate : P ) -> Option < usize > where
733
+ P : FnMut ( Self :: Item ) -> bool
734
+ {
735
+ self . 0 . position ( predicate)
736
+ }
737
+
738
+ #[ inline]
739
+ fn rposition < P > ( & mut self , predicate : P ) -> Option < usize > where
740
+ P : FnMut ( Self :: Item ) -> bool
741
+ {
742
+ self . 0 . rposition ( predicate)
743
+ }
713
744
}
714
745
715
746
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -718,6 +749,13 @@ impl<'a> DoubleEndedIterator for Bytes<'a> {
718
749
fn next_back ( & mut self ) -> Option < u8 > {
719
750
self . 0 . next_back ( )
720
751
}
752
+
753
+ #[ inline]
754
+ fn rfind < P > ( & mut self , predicate : P ) -> Option < Self :: Item > where
755
+ P : FnMut ( & Self :: Item ) -> bool
756
+ {
757
+ self . 0 . rfind ( predicate)
758
+ }
721
759
}
722
760
723
761
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
You can’t perform that action at this time.
0 commit comments