Skip to content

Commit

Permalink
Inline StrSearcher::haystack()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbool committed Jun 17, 2017
1 parent ff9f2d2 commit ca52d80
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 ca52d80

Please sign in to comment.