Skip to content

Commit 41aeb9d

Browse files
committed
std_unicode: Use #[inline] on the split_whitespace predicates
1 parent f41ecef commit 41aeb9d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd_unicode/u_str.rs

+4
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,14 @@ struct IsWhitespace;
136136
impl FnOnce<(char, )> for IsWhitespace {
137137
type Output = bool;
138138

139+
#[inline]
139140
extern "rust-call" fn call_once(mut self, arg: (char, )) -> bool {
140141
self.call_mut(arg)
141142
}
142143
}
143144

144145
impl FnMut<(char, )> for IsWhitespace {
146+
#[inline]
145147
extern "rust-call" fn call_mut(&mut self, arg: (char, )) -> bool {
146148
arg.0.is_whitespace()
147149
}
@@ -153,12 +155,14 @@ struct IsNotEmpty;
153155
impl<'a, 'b> FnOnce<(&'a &'b str, )> for IsNotEmpty {
154156
type Output = bool;
155157

158+
#[inline]
156159
extern "rust-call" fn call_once(mut self, arg: (&&str, )) -> bool {
157160
self.call_mut(arg)
158161
}
159162
}
160163

161164
impl<'a, 'b> FnMut<(&'a &'b str, )> for IsNotEmpty {
165+
#[inline]
162166
extern "rust-call" fn call_mut(&mut self, arg: (&&str, )) -> bool {
163167
!arg.0.is_empty()
164168
}

0 commit comments

Comments
 (0)