Skip to content

Commit

Permalink
Rollup merge of rust-lang#42714 - alexbool:master, r=alexcrichton
Browse files Browse the repository at this point in the history
Inline StrSearcher::haystack()
  • Loading branch information
frewsxcv authored Jun 18, 2017
2 parents 998ee7b + ca52d80 commit f046e6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libcore/str/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f046e6d

Please sign in to comment.