File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1366,8 +1366,7 @@ impl<'self> StrSlice<'self> for &'self str {
1366
1366
/// beyond the last character of the string
1367
1367
#[inline]
1368
1368
fn slice(&self, begin: uint, end: uint) -> &'self str {
1369
- assert!(self.is_char_boundary(begin));
1370
- assert!(self.is_char_boundary(end));
1369
+ assert!(self.is_char_boundary(begin) && self.is_char_boundary(end));
1371
1370
unsafe { raw::slice_bytes(*self, begin, end) }
1372
1371
}
1373
1372
@@ -1609,6 +1608,7 @@ impl<'self> StrSlice<'self> for &'self str {
1609
1608
1610
1609
/// Returns false if the index points into the middle of a multi-byte
1611
1610
/// character sequence.
1611
+ #[inline]
1612
1612
fn is_char_boundary(&self, index: uint) -> bool {
1613
1613
if index == self.len() { return true; }
1614
1614
let b = self[index];
@@ -1694,6 +1694,7 @@ impl<'self> StrSlice<'self> for &'self str {
1694
1694
/// This function can be used to iterate over a unicode string in reverse.
1695
1695
///
1696
1696
/// Returns 0 for next index if called on start index 0.
1697
+ #[inline]
1697
1698
fn char_range_at_reverse(&self, start: uint) -> CharRange {
1698
1699
let mut prev = start;
1699
1700
You can’t perform that action at this time.
0 commit comments