File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: f33a30e7e8f22a1e438dc5b30959bb80829ee505
2
+ refs/heads/master: 8931ad9e52e4f23043eea9cc63039d7e5f1e1efc
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 67c954e365970e4c2cd06f0c50724656d7010f45
5
5
refs/heads/try: 10089455287dcc3652b984ab4bfd6971e1b5f302
Original file line number Diff line number Diff line change @@ -1427,7 +1427,8 @@ impl<'self> StrSlice<'self> for &'self str {
1427
1427
/// out of bounds.
1428
1428
#[inline]
1429
1429
fn slice_to(&self, end: uint) -> &'self str {
1430
- self.slice(0, end)
1430
+ assert!(self.is_char_boundary(end));
1431
+ unsafe { raw::slice_bytes(*self, 0, end) }
1431
1432
}
1432
1433
1433
1434
/// Returns a slice of the string from the char range
You can’t perform that action at this time.
0 commit comments