Mark str::split_at inline

This commit is contained in:
Ulrik Sverdrup 2016-03-23 22:02:36 +01:00
parent 235d77457d
commit 80e7a1be35
1 changed files with 1 additions and 0 deletions

View File

@ -1965,6 +1965,7 @@ impl StrExt for str {
self.find(pat)
}
#[inline]
fn split_at(&self, mid: usize) -> (&str, &str) {
// is_char_boundary checks that the index is in [0, .len()]
if self.is_char_boundary(mid) {