Skip to content

Commit

Permalink
unstable: fix Pattern trait implementation
Browse files Browse the repository at this point in the history
I am teetering on removing this cursed implementation.

Fixes #1231
  • Loading branch information
BurntSushi committed Oct 24, 2024
1 parent bcbe403 commit 991ba88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pattern.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use core::str::pattern::{Pattern, SearchStep, Searcher};
use core::str::pattern::{Pattern, SearchStep, Searcher, Utf8Pattern};

use crate::{Matches, Regex};

@@ -21,6 +21,10 @@ impl<'r> Pattern for &'r Regex {
next_match: None,
}
}

fn as_utf8_pattern<'p>(&'p self) -> Option<Utf8Pattern<'p>> {
None
}
}

unsafe impl<'r, 't> Searcher<'t> for RegexSearcher<'r, 't> {

0 comments on commit 991ba88

Please sign in to comment.