Skip to content

Commit

Permalink
unstable: fit Pattern trait implementation
Browse files Browse the repository at this point in the history
This is an update from a change made to the trait:
rust-lang/rust#127481

There shouldn't be any behavior changes here.

PR #1219
  • Loading branch information
mischnic authored Aug 2, 2024
1 parent 8856fe3 commit 2970d29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ pub struct RegexSearcher<'r, 't> {
next_match: Option<(usize, usize)>,
}

impl<'r, 't> Pattern<'t> for &'r Regex {
type Searcher = RegexSearcher<'r, 't>;
impl<'r> Pattern for &'r Regex {
type Searcher<'t> = RegexSearcher<'r, 't>;

fn into_searcher(self, haystack: &'t str) -> RegexSearcher<'r, 't> {
fn into_searcher<'t>(self, haystack: &'t str) -> RegexSearcher<'r, 't> {
RegexSearcher {
haystack,
it: self.find_iter(haystack),
Expand Down

0 comments on commit 2970d29

Please sign in to comment.