Rollup merge of #42714 - alexbool:master, r=alexcrichton

Inline StrSearcher::haystack()
This commit is contained in:
Mark Simulacrum 2017-06-18 10:34:09 -06:00 committed by GitHub
commit 9b4c4d001f
1 changed files with 4 additions and 1 deletions

View File

@ -618,7 +618,10 @@ impl<'a, 'b> StrSearcher<'a, 'b> {
}
unsafe impl<'a, 'b> Searcher<'a> for StrSearcher<'a, 'b> {
fn haystack(&self) -> &'a str { self.haystack }
#[inline]
fn haystack(&self) -> &'a str {
self.haystack
}
#[inline]
fn next(&mut self) -> SearchStep {