Skip to content

Commit

Permalink
chore: remove repetitive words
Browse files Browse the repository at this point in the history
Signed-off-by: tgolang <seekseat@aliyun.com>
  • Loading branch information
tgolang committed Mar 11, 2024
1 parent a5ae351 commit 6632b99
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion regex-automata/src/meta/regex.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion regex-automata/src/util/start.rs
Original file line number Diff line number Diff line change
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
4 changes: 2 additions & 2 deletions regex-lite/src/lib.rs
Original file line number Diff line number Diff line change
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

0 comments on commit 6632b99

Please sign in to comment.