Skip to content

Commit

Permalink
doc: remove repetitive words
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnEndson committed Mar 28, 2024
1 parent d895bd9 commit 66a3bca
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion regex-automata/src/dfa/mod.rs
Expand Up @@ -190,7 +190,7 @@ assert_eq!(matches, vec![
```
Note that unlike dense DFAs, sparse DFAs have no alignment requirements.
Conversely, dense DFAs must be be aligned to the same alignment as a
Conversely, dense DFAs must be aligned to the same alignment as a
[`StateID`](crate::util::primitives::StateID).
# Support for `no_std` and `alloc`-only
Expand Down
4 changes: 2 additions & 2 deletions regex-automata/src/meta/regex.rs
Expand Up @@ -1826,7 +1826,7 @@ impl Regex {
///
/// The precise meaning of "accelerated" is specifically left unspecified,
/// but the general meaning is that the search is a high likelihood of
/// running faster than than a character-at-a-time loop inside a standard
/// running faster than a character-at-a-time loop inside a standard
/// regex engine.
///
/// When a regex is accelerated, it is only a *probabilistic* claim. That
Expand Down Expand Up @@ -2282,7 +2282,7 @@ impl<'r, 'h> core::iter::FusedIterator for SplitN<'r, 'h> {}
///
/// Most of the regex engines in this crate require some kind of
/// mutable state in order to execute a search. This mutable state is
/// explicitly separated from the the core regex object (such as a
/// explicitly separated from the core regex object (such as a
/// [`thompson::NFA`](crate::nfa::thompson::NFA)) so that the read-only regex
/// object can be shared across multiple threads simultaneously without any
/// synchronization. Conversely, a `Cache` must either be duplicated if using
Expand Down
2 changes: 1 addition & 1 deletion regex-automata/src/nfa/thompson/range_trie.rs
Expand Up @@ -693,7 +693,7 @@ impl NextInsert {
/// handle:
///
/// 1. The part where the two ranges actually overlap. i.e., The intersection.
/// 2. The part of the existing range that is not in the the new range.
/// 2. The part of the existing range that is not in the new range.
/// 3. The part of the new range that is not in the old range.
///
/// (1) is guaranteed to always occur since all overlapping ranges have a
Expand Down
2 changes: 1 addition & 1 deletion regex-automata/src/util/alphabet.rs
Expand Up @@ -699,7 +699,7 @@ impl ByteClassSet {
ByteClassSet(ByteSet::empty())
}

/// Indicate the the range of byte given (inclusive) can discriminate a
/// Indicate the range of byte given (inclusive) can discriminate a
/// match between it and all other bytes outside of the range.
pub(crate) fn set_range(&mut self, start: u8, end: u8) {
debug_assert!(start <= end);
Expand Down
4 changes: 2 additions & 2 deletions regex-automata/src/util/captures.rs
Expand Up @@ -1643,7 +1643,7 @@ impl GroupInfo {
///
/// This also returns `None` for all inputs if these captures are empty
/// (e.g., built from an empty [`GroupInfo`]). To check whether captures
/// are are present for a specific pattern, use [`GroupInfo::group_len`].
/// are present for a specific pattern, use [`GroupInfo::group_len`].
///
/// # Example
///
Expand Down Expand Up @@ -1695,7 +1695,7 @@ impl GroupInfo {
///
/// This also returns `None` for all inputs if these captures are empty
/// (e.g., built from an empty [`GroupInfo`]). To check whether captures
/// are are present for a specific pattern, use [`GroupInfo::group_len`].
/// are present for a specific pattern, use [`GroupInfo::group_len`].
///
/// # Example
///
Expand Down
2 changes: 1 addition & 1 deletion regex-automata/src/util/start.rs
Expand Up @@ -323,7 +323,7 @@ impl core::fmt::Debug for StartByteMap {

/// Represents the six possible starting configurations of a DFA search.
///
/// The starting configuration is determined by inspecting the the beginning
/// The starting configuration is determined by inspecting the beginning
/// of the haystack (up to 1 byte). Ultimately, this along with a pattern ID
/// (if specified) and the type of search (anchored or not) is what selects the
/// start state to use in a DFA.
Expand Down
2 changes: 1 addition & 1 deletion regex-cli/cmd/generate/fowler.rs
Expand Up @@ -178,7 +178,7 @@ impl TomlTest {
// this trade off (to this extent anyway), so it really wants all
// capturing groups...
//
// So what we do here is is look for the number of groups in the
// So what we do here is look for the number of groups in the
// pattern and then just pad out the capture matches with None
// values to make the number of capture matches equal to what we
// would expect from the pattern. (We actually parse the regex to
Expand Down
4 changes: 2 additions & 2 deletions regex-lite/src/lib.rs
Expand Up @@ -257,7 +257,7 @@ let dates: Vec<(&str, &str, &str)> = re.captures_iter(hay).map(|caps| {
// regex matches, and in this context, we know we have a match.
//
// Note that we use `caps.name("y").unwrap().as_str()` instead of
// `&caps["y"]` because the the lifetime of the former is the same as the
// `&caps["y"]` because the lifetime of the former is the same as the
// lifetime of `hay` above, but the lifetime of the latter is tied to the
// lifetime of `caps` due to how the `Index` trait is defined.
let year = caps.name("y").unwrap().as_str();
Expand Down Expand Up @@ -821,7 +821,7 @@ it, a longer haystack will take more time to search.
* Very large regexes can searches to be quite slow due to increasing the size
`m` in the worst case `O(m * n)` bound. This is especially true when they
are combined with counted repetitions. While the regex size limit above will
protect you from the most egregious cases, the the default size limit still
protect you from the most egregious cases, the default size limit still
permits pretty big regexes that can execute more slowly than one might expect.
* While routines like [`Regex::find`] and [`Regex::captures`] guarantee
worst case `O(m * n)` search time, routines like [`Regex::find_iter`] and
Expand Down
2 changes: 1 addition & 1 deletion regex-syntax/src/ast/mod.rs
Expand Up @@ -711,7 +711,7 @@ pub enum LiteralKind {
/// The literal is written as an octal escape, e.g., `\141`.
Octal,
/// The literal is written as a hex code with a fixed number of digits
/// depending on the type of the escape, e.g., `\x61` or or `\u0061` or
/// depending on the type of the escape, e.g., `\x61` or `\u0061` or
/// `\U00000061`.
HexFixed(HexLiteralKind),
/// The literal is written as a hex code with a bracketed number of
Expand Down
2 changes: 1 addition & 1 deletion src/regexset/bytes.rs
Expand Up @@ -355,7 +355,7 @@ impl RegexSet {
) -> bool {
// This is pretty dumb. We should try to fix this, but the
// regex-automata API doesn't provide a way to store matches in an
// arbitrary &mut [bool]. Thankfully, this API is is doc(hidden) and
// arbitrary &mut [bool]. Thankfully, this API is doc(hidden) and
// thus not public... But regex-capi currently uses it. We should
// fix regex-capi to use a PatternSet, maybe? Not sure... PatternSet
// is in regex-automata, not regex. So maybe we should just accept a
Expand Down
2 changes: 1 addition & 1 deletion src/regexset/string.rs
Expand Up @@ -351,7 +351,7 @@ impl RegexSet {
) -> bool {
// This is pretty dumb. We should try to fix this, but the
// regex-automata API doesn't provide a way to store matches in an
// arbitrary &mut [bool]. Thankfully, this API is is doc(hidden) and
// arbitrary &mut [bool]. Thankfully, this API is doc(hidden) and
// thus not public... But regex-capi currently uses it. We should
// fix regex-capi to use a PatternSet, maybe? Not sure... PatternSet
// is in regex-automata, not regex. So maybe we should just accept a
Expand Down

0 comments on commit 66a3bca

Please sign in to comment.