Skip to content

Commit ed34372

Browse files
committed
fix compilation of the pattern feature
See: rust-lang/rust#127481
1 parent c02c240 commit ed34372

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pattern.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ impl<'h> CoreSearcher<'h> {
5151
}
5252
}
5353

54-
impl<'h, F> Pattern<'h> for AsciiChars<F>
54+
impl<F> Pattern for AsciiChars<F>
5555
where
5656
F: Fn(u8) -> bool,
5757
{
58-
type Searcher = AsciiCharsSearcher<'h, F>;
58+
type Searcher<'h> = AsciiCharsSearcher<'h, F>;
5959

60-
fn into_searcher(self, haystack: &'h str) -> Self::Searcher {
60+
fn into_searcher(self, haystack: &str) -> Self::Searcher<'_> {
6161
AsciiCharsSearcher {
6262
searcher: CoreSearcher::new(haystack),
6363
finder: self,
@@ -105,10 +105,10 @@ where
105105
/// substring to search for is the empty string. It will never
106106
/// match. This behavior may change in the future to more closely
107107
/// align with the standard library.
108-
impl<'n, 'h> Pattern<'h> for Substring<'n> {
109-
type Searcher = SubstringSearcher<'n, 'h>;
108+
impl<'n> Pattern for Substring<'n> {
109+
type Searcher<'h> = SubstringSearcher<'n, 'h>;
110110

111-
fn into_searcher(self, haystack: &'h str) -> Self::Searcher {
111+
fn into_searcher(self, haystack: &str) -> Self::Searcher<'_> {
112112
SubstringSearcher {
113113
searcher: CoreSearcher::new(haystack),
114114
finder: self,

0 commit comments

Comments
 (0)