Skip to content

Commit 991ba88

Browse files
committed
unstable: fix Pattern trait implementation
I am teetering on removing this cursed implementation. Fixes #1231
1 parent bcbe403 commit 991ba88

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pattern.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use core::str::pattern::{Pattern, SearchStep, Searcher};
1+
use core::str::pattern::{Pattern, SearchStep, Searcher, Utf8Pattern};
22

33
use crate::{Matches, Regex};
44

@@ -21,6 +21,10 @@ impl<'r> Pattern for &'r Regex {
2121
next_match: None,
2222
}
2323
}
24+
25+
fn as_utf8_pattern<'p>(&'p self) -> Option<Utf8Pattern<'p>> {
26+
None
27+
}
2428
}
2529

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

0 commit comments

Comments
 (0)