File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 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> {
710710 fn nth ( & mut self , n : usize ) -> Option < Self :: Item > {
711711 self . 0 . nth ( n)
712712 }
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+ }
713744}
714745
715746#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -718,6 +749,13 @@ impl<'a> DoubleEndedIterator for Bytes<'a> {
718749 fn next_back ( & mut self ) -> Option < u8 > {
719750 self . 0 . next_back ( )
720751 }
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+ }
721759}
722760
723761#[ stable( feature = "rust1" , since = "1.0.0" ) ]
You can’t perform that action at this time.
0 commit comments