Skip to content

Commit c1fdc83

Browse files
authored
automata: make Input::haystack return with original lifetime
This was an oversight in the API. Since shared borrows use sub-typing, this should be a fully backward compatible change. PR #1277
1 parent 71233b5 commit c1fdc83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regex-automata/src/util/search.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ impl<'h> Input<'h> {
590590
/// assert_eq!(b"foobar", input.haystack());
591591
/// ```
592592
#[inline]
593-
pub fn haystack(&self) -> &[u8] {
593+
pub fn haystack(&self) -> &'h [u8] {
594594
self.haystack
595595
}
596596

0 commit comments

Comments
 (0)