Skip to content

Commit 0d49d85

Browse files
committed
---
yaml --- r: 14258 b: refs/heads/try c: 0e61fe2 h: refs/heads/master v: v3
1 parent 5367734 commit 0d49d85

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 8309d50ff4ead4dd58b8f3c8388d5668e2e0d152
5+
refs/heads/try: 0e61fe2eeaff507ed409c432988aed40a9fe9c63
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/libcore/str.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -932,12 +932,12 @@ Parameters:
932932
haystack - The string to look in
933933
needle - The string to look for
934934
*/
935-
fn starts_with(haystack: str, needle: str) -> bool {
936-
let haystack_len: uint = len(haystack);
937-
let needle_len: uint = len(needle);
935+
fn starts_with(haystack: str, needle: str) -> bool unsafe {
936+
let haystack_len: uint = len_bytes(haystack);
937+
let needle_len: uint = len_bytes(needle);
938938
if needle_len == 0u { ret true; }
939939
if needle_len > haystack_len { ret false; }
940-
ret eq(substr(haystack, 0u, needle_len), needle);
940+
ret eq(unsafe::slice_bytes(haystack, 0u, needle_len), needle);
941941
}
942942

943943
/*

0 commit comments

Comments
 (0)