Skip to content

Commit 66a3bca

Browse files
author
JohnEndson
authored
doc: remove repetitive words
PR #1179
1 parent d895bd9 commit 66a3bca

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

regex-automata/src/dfa/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ assert_eq!(matches, vec![
190190
```
191191
192192
Note that unlike dense DFAs, sparse DFAs have no alignment requirements.
193-
Conversely, dense DFAs must be be aligned to the same alignment as a
193+
Conversely, dense DFAs must be aligned to the same alignment as a
194194
[`StateID`](crate::util::primitives::StateID).
195195
196196
# Support for `no_std` and `alloc`-only

regex-automata/src/meta/regex.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,7 @@ impl Regex {
18261826
///
18271827
/// The precise meaning of "accelerated" is specifically left unspecified,
18281828
/// but the general meaning is that the search is a high likelihood of
1829-
/// running faster than than a character-at-a-time loop inside a standard
1829+
/// running faster than a character-at-a-time loop inside a standard
18301830
/// regex engine.
18311831
///
18321832
/// When a regex is accelerated, it is only a *probabilistic* claim. That
@@ -2282,7 +2282,7 @@ impl<'r, 'h> core::iter::FusedIterator for SplitN<'r, 'h> {}
22822282
///
22832283
/// Most of the regex engines in this crate require some kind of
22842284
/// mutable state in order to execute a search. This mutable state is
2285-
/// explicitly separated from the the core regex object (such as a
2285+
/// explicitly separated from the core regex object (such as a
22862286
/// [`thompson::NFA`](crate::nfa::thompson::NFA)) so that the read-only regex
22872287
/// object can be shared across multiple threads simultaneously without any
22882288
/// synchronization. Conversely, a `Cache` must either be duplicated if using

regex-automata/src/nfa/thompson/range_trie.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ impl NextInsert {
693693
/// handle:
694694
///
695695
/// 1. The part where the two ranges actually overlap. i.e., The intersection.
696-
/// 2. The part of the existing range that is not in the the new range.
696+
/// 2. The part of the existing range that is not in the new range.
697697
/// 3. The part of the new range that is not in the old range.
698698
///
699699
/// (1) is guaranteed to always occur since all overlapping ranges have a

regex-automata/src/util/alphabet.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ impl ByteClassSet {
699699
ByteClassSet(ByteSet::empty())
700700
}
701701

702-
/// Indicate the the range of byte given (inclusive) can discriminate a
702+
/// Indicate the range of byte given (inclusive) can discriminate a
703703
/// match between it and all other bytes outside of the range.
704704
pub(crate) fn set_range(&mut self, start: u8, end: u8) {
705705
debug_assert!(start <= end);

regex-automata/src/util/captures.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@ impl GroupInfo {
16431643
///
16441644
/// This also returns `None` for all inputs if these captures are empty
16451645
/// (e.g., built from an empty [`GroupInfo`]). To check whether captures
1646-
/// are are present for a specific pattern, use [`GroupInfo::group_len`].
1646+
/// are present for a specific pattern, use [`GroupInfo::group_len`].
16471647
///
16481648
/// # Example
16491649
///
@@ -1695,7 +1695,7 @@ impl GroupInfo {
16951695
///
16961696
/// This also returns `None` for all inputs if these captures are empty
16971697
/// (e.g., built from an empty [`GroupInfo`]). To check whether captures
1698-
/// are are present for a specific pattern, use [`GroupInfo::group_len`].
1698+
/// are present for a specific pattern, use [`GroupInfo::group_len`].
16991699
///
17001700
/// # Example
17011701
///

regex-automata/src/util/start.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ impl core::fmt::Debug for StartByteMap {
323323

324324
/// Represents the six possible starting configurations of a DFA search.
325325
///
326-
/// The starting configuration is determined by inspecting the the beginning
326+
/// The starting configuration is determined by inspecting the beginning
327327
/// of the haystack (up to 1 byte). Ultimately, this along with a pattern ID
328328
/// (if specified) and the type of search (anchored or not) is what selects the
329329
/// start state to use in a DFA.

regex-cli/cmd/generate/fowler.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl TomlTest {
178178
// this trade off (to this extent anyway), so it really wants all
179179
// capturing groups...
180180
//
181-
// So what we do here is is look for the number of groups in the
181+
// So what we do here is look for the number of groups in the
182182
// pattern and then just pad out the capture matches with None
183183
// values to make the number of capture matches equal to what we
184184
// would expect from the pattern. (We actually parse the regex to

regex-lite/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ let dates: Vec<(&str, &str, &str)> = re.captures_iter(hay).map(|caps| {
257257
// regex matches, and in this context, we know we have a match.
258258
//
259259
// Note that we use `caps.name("y").unwrap().as_str()` instead of
260-
// `&caps["y"]` because the the lifetime of the former is the same as the
260+
// `&caps["y"]` because the lifetime of the former is the same as the
261261
// lifetime of `hay` above, but the lifetime of the latter is tied to the
262262
// lifetime of `caps` due to how the `Index` trait is defined.
263263
let year = caps.name("y").unwrap().as_str();
@@ -821,7 +821,7 @@ it, a longer haystack will take more time to search.
821821
* Very large regexes can searches to be quite slow due to increasing the size
822822
`m` in the worst case `O(m * n)` bound. This is especially true when they
823823
are combined with counted repetitions. While the regex size limit above will
824-
protect you from the most egregious cases, the the default size limit still
824+
protect you from the most egregious cases, the default size limit still
825825
permits pretty big regexes that can execute more slowly than one might expect.
826826
* While routines like [`Regex::find`] and [`Regex::captures`] guarantee
827827
worst case `O(m * n)` search time, routines like [`Regex::find_iter`] and

regex-syntax/src/ast/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ pub enum LiteralKind {
711711
/// The literal is written as an octal escape, e.g., `\141`.
712712
Octal,
713713
/// The literal is written as a hex code with a fixed number of digits
714-
/// depending on the type of the escape, e.g., `\x61` or or `\u0061` or
714+
/// depending on the type of the escape, e.g., `\x61` or `\u0061` or
715715
/// `\U00000061`.
716716
HexFixed(HexLiteralKind),
717717
/// The literal is written as a hex code with a bracketed number of

src/regexset/bytes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl RegexSet {
355355
) -> bool {
356356
// This is pretty dumb. We should try to fix this, but the
357357
// regex-automata API doesn't provide a way to store matches in an
358-
// arbitrary &mut [bool]. Thankfully, this API is is doc(hidden) and
358+
// arbitrary &mut [bool]. Thankfully, this API is doc(hidden) and
359359
// thus not public... But regex-capi currently uses it. We should
360360
// fix regex-capi to use a PatternSet, maybe? Not sure... PatternSet
361361
// is in regex-automata, not regex. So maybe we should just accept a

src/regexset/string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ impl RegexSet {
351351
) -> bool {
352352
// This is pretty dumb. We should try to fix this, but the
353353
// regex-automata API doesn't provide a way to store matches in an
354-
// arbitrary &mut [bool]. Thankfully, this API is is doc(hidden) and
354+
// arbitrary &mut [bool]. Thankfully, this API is doc(hidden) and
355355
// thus not public... But regex-capi currently uses it. We should
356356
// fix regex-capi to use a PatternSet, maybe? Not sure... PatternSet
357357
// is in regex-automata, not regex. So maybe we should just accept a

0 commit comments

Comments
 (0)