From 41aeb9d4ec26c4b6fb118483d2d1375e04b2c62f Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Sun, 30 Apr 2017 21:24:47 +0200 Subject: [PATCH] std_unicode: Use #[inline] on the split_whitespace predicates --- src/libstd_unicode/u_str.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libstd_unicode/u_str.rs b/src/libstd_unicode/u_str.rs index e138e71c9c1..1454168d2d5 100644 --- a/src/libstd_unicode/u_str.rs +++ b/src/libstd_unicode/u_str.rs @@ -136,12 +136,14 @@ impl FusedIterator for Utf16Encoder impl FnOnce<(char, )> for IsWhitespace { type Output = bool; + #[inline] extern "rust-call" fn call_once(mut self, arg: (char, )) -> bool { self.call_mut(arg) } } impl FnMut<(char, )> for IsWhitespace { + #[inline] extern "rust-call" fn call_mut(&mut self, arg: (char, )) -> bool { arg.0.is_whitespace() } @@ -153,12 +155,14 @@ extern "rust-call" fn call_mut(&mut self, arg: (char, )) -> bool { impl<'a, 'b> FnOnce<(&'a &'b str, )> for IsNotEmpty { type Output = bool; + #[inline] extern "rust-call" fn call_once(mut self, arg: (&&str, )) -> bool { self.call_mut(arg) } } impl<'a, 'b> FnMut<(&'a &'b str, )> for IsNotEmpty { + #[inline] extern "rust-call" fn call_mut(&mut self, arg: (&&str, )) -> bool { !arg.0.is_empty() }