From ca52d8033896efaef095af18a134e92c8005dc6a Mon Sep 17 00:00:00 2001 From: Alexander Bulaev Date: Sat, 17 Jun 2017 13:51:36 +0300 Subject: [PATCH] Inline StrSearcher::haystack() --- src/libcore/str/pattern.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs index 4918e37eb35..5a007285e48 100644 --- a/src/libcore/str/pattern.rs +++ b/src/libcore/str/pattern.rs @@ -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 { -- 2.44.0