Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ impl<'h> CoreSearcher<'h> {
}
}

impl<'h, F> Pattern<'h> for AsciiChars<F>
impl<F> Pattern for AsciiChars<F>
where
F: Fn(u8) -> bool,
{
type Searcher = AsciiCharsSearcher<'h, F>;
type Searcher<'h> = AsciiCharsSearcher<'h, F>;

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

fn into_searcher(self, haystack: &'h str) -> Self::Searcher {
fn into_searcher(self, haystack: &str) -> Self::Searcher<'_> {
SubstringSearcher {
searcher: CoreSearcher::new(haystack),
finder: self,
Expand Down
Loading