Skip to content

Commit 9b4c4d0

Browse files
Rollup merge of rust-lang#42714 - alexbool:master, r=alexcrichton
Inline StrSearcher::haystack()
2 parents 7eff974 + ca52d80 commit 9b4c4d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libcore/str/pattern.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,10 @@ impl<'a, 'b> StrSearcher<'a, 'b> {
618618
}
619619

620620
unsafe impl<'a, 'b> Searcher<'a> for StrSearcher<'a, 'b> {
621-
fn haystack(&self) -> &'a str { self.haystack }
621+
#[inline]
622+
fn haystack(&self) -> &'a str {
623+
self.haystack
624+
}
622625

623626
#[inline]
624627
fn next(&mut self) -> SearchStep {

0 commit comments

Comments
 (0)