From b380632b1b0e2c3d187732e1328a5153dd2d4f0d Mon Sep 17 00:00:00 2001
From: Christopher Durham <cad97@cad97.com>
Date: Fri, 28 Jan 2022 09:31:34 -0600
Subject: [PATCH] doc: clarify Captures::len includes non-matching captures

We do the same for CaptureLocations too.

Closes #832
---
 src/re_bytes.rs   | 4 ++--
 src/re_unicode.rs | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/re_bytes.rs b/src/re_bytes.rs
index ae55d6d25..164a6203c 100644
--- a/src/re_bytes.rs
+++ b/src/re_bytes.rs
@@ -877,7 +877,7 @@ impl CaptureLocations {
         self.0.pos(i)
     }
 
-    /// Returns the total number of capturing groups.
+    /// Returns the total number of capture groups (even if they didn't match).
     ///
     /// This is always at least `1` since every regex has at least `1`
     /// capturing group that corresponds to the entire match.
@@ -979,7 +979,7 @@ impl<'t> Captures<'t> {
         expand_bytes(self, replacement, dst)
     }
 
-    /// Returns the number of captured groups.
+    /// Returns the total number of capture groups (even if they didn't match).
     ///
     /// This is always at least `1`, since every regex has at least one capture
     /// group that corresponds to the full match.
diff --git a/src/re_unicode.rs b/src/re_unicode.rs
index 8c4ecfc9c..4c930f4d3 100644
--- a/src/re_unicode.rs
+++ b/src/re_unicode.rs
@@ -887,7 +887,7 @@ impl CaptureLocations {
         self.0.pos(i)
     }
 
-    /// Returns the total number of capturing groups.
+    /// Returns the total number of capture groups (even if they didn't match).
     ///
     /// This is always at least `1` since every regex has at least `1`
     /// capturing group that corresponds to the entire match.
@@ -989,7 +989,7 @@ impl<'t> Captures<'t> {
         expand_str(self, replacement, dst)
     }
 
-    /// Returns the number of captured groups.
+    /// Returns the total number of capture groups (even if they didn't match).
     ///
     /// This is always at least `1`, since every regex has at least one capture
     /// group that corresponds to the full match.