std_unicode: Use #[inline] on the split_whitespace predicates
This commit is contained in:
parent
f41ecef6d5
commit
41aeb9d4ec
@ -136,12 +136,14 @@ struct IsWhitespace;
|
||||
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 @@ struct IsNotEmpty;
|
||||
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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user