]> git.lizzy.rs Git - rust.git/commitdiff
Inline StrSearcher::haystack()
authorAlexander Bulaev <alexbool@yandex-team.ru>
Sat, 17 Jun 2017 10:51:36 +0000 (13:51 +0300)
committerAlexander Bulaev <alexbool@yandex-team.ru>
Sat, 17 Jun 2017 10:51:36 +0000 (13:51 +0300)
src/libcore/str/pattern.rs

index 4918e37eb35f08a266122920a2def0a07bb2ea81..5a007285e48735657bf07308064636051e87b3ea 100644 (file)
@@ -618,7 +618,10 @@ fn new(haystack: &'a str, needle: &'b str) -> 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 {