Skip to content

Commit 47b5fe8

Browse files
author
blake2-ppc
committed
---
yaml --- r: 75707 b: refs/heads/master c: 8931ad9 h: refs/heads/master i: 75705: 492fed4 75703: b0da52c v: v3
1 parent 1a7283b commit 47b5fe8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f33a30e7e8f22a1e438dc5b30959bb80829ee505
2+
refs/heads/master: 8931ad9e52e4f23043eea9cc63039d7e5f1e1efc
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 67c954e365970e4c2cd06f0c50724656d7010f45
55
refs/heads/try: 10089455287dcc3652b984ab4bfd6971e1b5f302

trunk/src/libstd/str.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,8 @@ impl<'self> StrSlice<'self> for &'self str {
14271427
/// out of bounds.
14281428
#[inline]
14291429
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) }
14311432
}
14321433
14331434
/// Returns a slice of the string from the char range

0 commit comments

Comments
 (0)