From 2970d2940dfab8cb4bd8f7122ba8ee50d2e37f67 Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:08:11 +0200 Subject: [PATCH] unstable: fit `Pattern` trait implementation This is an update from a change made to the trait: https://github.com/rust-lang/rust/pull/127481 There shouldn't be any behavior changes here. PR #1219 --- src/pattern.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pattern.rs b/src/pattern.rs index 2db04d8b3..5c4260e95 100644 --- a/src/pattern.rs +++ b/src/pattern.rs @@ -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),