Skip to content

Commit 2970d29

Browse files
authored
unstable: fit Pattern trait implementation
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
1 parent 8856fe3 commit 2970d29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/pattern.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ pub struct RegexSearcher<'r, 't> {
1010
next_match: Option<(usize, usize)>,
1111
}
1212

13-
impl<'r, 't> Pattern<'t> for &'r Regex {
14-
type Searcher = RegexSearcher<'r, 't>;
13+
impl<'r> Pattern for &'r Regex {
14+
type Searcher<'t> = RegexSearcher<'r, 't>;
1515

16-
fn into_searcher(self, haystack: &'t str) -> RegexSearcher<'r, 't> {
16+
fn into_searcher<'t>(self, haystack: &'t str) -> RegexSearcher<'r, 't> {
1717
RegexSearcher {
1818
haystack,
1919
it: self.find_iter(haystack),

0 commit comments

Comments
 (0)