@@ -184,8 +184,8 @@ impl Regex {
184
184
/// }
185
185
/// # }
186
186
/// ```
187
- pub fn find_iter < ' r , ' t > ( & ' r self , text : & ' t [ u8 ] ) -> FindIter < ' r , ' t > {
188
- FindIter ( self . 0 . searcher ( ) . find_iter ( text) )
187
+ pub fn find_iter < ' r , ' t > ( & ' r self , text : & ' t [ u8 ] ) -> Matches < ' r , ' t > {
188
+ Matches ( self . 0 . searcher ( ) . find_iter ( text) )
189
189
}
190
190
191
191
/// Returns the capture groups corresponding to the leftmost-first
@@ -289,8 +289,8 @@ impl Regex {
289
289
pub fn captures_iter < ' r , ' t > (
290
290
& ' r self ,
291
291
text : & ' t [ u8 ] ,
292
- ) -> CapturesIter < ' r , ' t > {
293
- CapturesIter ( self . 0 . searcher ( ) . captures_iter ( text) )
292
+ ) -> CaptureMatches < ' r , ' t > {
293
+ CaptureMatches ( self . 0 . searcher ( ) . captures_iter ( text) )
294
294
}
295
295
296
296
/// Returns an iterator of substrings of `text` delimited by a match of the
@@ -313,8 +313,8 @@ impl Regex {
313
313
/// ]);
314
314
/// # }
315
315
/// ```
316
- pub fn split < ' r , ' t > ( & ' r self , text : & ' t [ u8 ] ) -> SplitsIter < ' r , ' t > {
317
- SplitsIter {
316
+ pub fn split < ' r , ' t > ( & ' r self , text : & ' t [ u8 ] ) -> Split < ' r , ' t > {
317
+ Split {
318
318
finder : self . find_iter ( text) ,
319
319
last : 0 ,
320
320
}
@@ -344,8 +344,8 @@ impl Regex {
344
344
& ' r self ,
345
345
text : & ' t [ u8 ] ,
346
346
limit : usize ,
347
- ) -> SplitsNIter < ' r , ' t > {
348
- SplitsNIter {
347
+ ) -> SplitN < ' r , ' t > {
348
+ SplitN {
349
349
splits : self . split ( text) ,
350
350
n : limit,
351
351
}
@@ -644,9 +644,9 @@ impl Regex {
644
644
///
645
645
/// `'r` is the lifetime of the compiled regular expression and `'t` is the
646
646
/// lifetime of the matched byte string.
647
- pub struct FindIter < ' r , ' t > ( re_trait:: FindIter < ' t , ExecNoSync < ' r > > ) ;
647
+ pub struct Matches < ' r , ' t > ( re_trait:: Matches < ' t , ExecNoSync < ' r > > ) ;
648
648
649
- impl < ' r , ' t > Iterator for FindIter < ' r , ' t > {
649
+ impl < ' r , ' t > Iterator for Matches < ' r , ' t > {
650
650
type Item = Match < ' t > ;
651
651
652
652
fn next ( & mut self ) -> Option < Match < ' t > > {
@@ -662,9 +662,9 @@ impl<'r, 't> Iterator for FindIter<'r, 't> {
662
662
///
663
663
/// `'r` is the lifetime of the compiled regular expression and `'t` is the
664
664
/// lifetime of the matched byte string.
665
- pub struct CapturesIter < ' r , ' t > ( re_trait:: CapturesIter < ' t , ExecNoSync < ' r > > ) ;
665
+ pub struct CaptureMatches < ' r , ' t > ( re_trait:: CaptureMatches < ' t , ExecNoSync < ' r > > ) ;
666
666
667
- impl < ' r , ' t > Iterator for CapturesIter < ' r , ' t > {
667
+ impl < ' r , ' t > Iterator for CaptureMatches < ' r , ' t > {
668
668
type Item = Captures < ' t > ;
669
669
670
670
fn next ( & mut self ) -> Option < Captures < ' t > > {
@@ -680,12 +680,12 @@ impl<'r, 't> Iterator for CapturesIter<'r, 't> {
680
680
///
681
681
/// `'r` is the lifetime of the compiled regular expression and `'t` is the
682
682
/// lifetime of the byte string being split.
683
- pub struct SplitsIter < ' r , ' t > {
684
- finder : FindIter < ' r , ' t > ,
683
+ pub struct Split < ' r , ' t > {
684
+ finder : Matches < ' r , ' t > ,
685
685
last : usize ,
686
686
}
687
687
688
- impl < ' r , ' t > Iterator for SplitsIter < ' r , ' t > {
688
+ impl < ' r , ' t > Iterator for Split < ' r , ' t > {
689
689
type Item = & ' t [ u8 ] ;
690
690
691
691
fn next ( & mut self ) -> Option < & ' t [ u8 ] > {
@@ -715,12 +715,12 @@ impl<'r, 't> Iterator for SplitsIter<'r, 't> {
715
715
///
716
716
/// `'r` is the lifetime of the compiled regular expression and `'t` is the
717
717
/// lifetime of the byte string being split.
718
- pub struct SplitsNIter < ' r , ' t > {
719
- splits : SplitsIter < ' r , ' t > ,
718
+ pub struct SplitN < ' r , ' t > {
719
+ splits : Split < ' r , ' t > ,
720
720
n : usize ,
721
721
}
722
722
723
- impl < ' r , ' t > Iterator for SplitsNIter < ' r , ' t > {
723
+ impl < ' r , ' t > Iterator for SplitN < ' r , ' t > {
724
724
type Item = & ' t [ u8 ] ;
725
725
726
726
fn next ( & mut self ) -> Option < & ' t [ u8 ] > {
0 commit comments