File tree 2 files changed +6
-12
lines changed
2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -791,16 +791,13 @@ impl<'t> Captures<'t> {
791
791
}
792
792
793
793
/// Returns the number of captured groups.
794
+ ///
795
+ /// This is always at least `1`, since every regex has at least one capture
796
+ /// group that corresponds to the full match.
794
797
#[ inline]
795
798
pub fn len ( & self ) -> usize {
796
799
self . slots . len ( ) / 2
797
800
}
798
-
799
- /// Returns true if and only if there are no captured groups.
800
- #[ inline]
801
- pub fn is_empty ( & self ) -> bool {
802
- self . len ( ) == 0
803
- }
804
801
}
805
802
806
803
impl < ' t > fmt:: Debug for Captures < ' t > {
Original file line number Diff line number Diff line change @@ -940,16 +940,13 @@ impl<'t> Captures<'t> {
940
940
}
941
941
942
942
/// Returns the number of captured groups.
943
+ ///
944
+ /// This is always at least `1`, since every regex has at least one capture
945
+ /// group that corresponds to the full match.
943
946
#[ inline]
944
947
pub fn len ( & self ) -> usize {
945
948
self . slots . len ( ) / 2
946
949
}
947
-
948
- /// Returns true if and only if there are no captured groups.
949
- #[ inline]
950
- pub fn is_empty ( & self ) -> bool {
951
- self . len ( ) == 0
952
- }
953
950
}
954
951
955
952
impl < ' t > fmt:: Debug for Captures < ' t > {
You can’t perform that action at this time.
0 commit comments