Skip to content

Commit 45bd07f

Browse files
killerswanmarijnh
authored andcommitted
---
yaml --- r: 14439 b: refs/heads/try c: 1cd5a09 h: refs/heads/master i: 14437: 25e43aa 14435: 5f1242e 14431: de65559 v: v3
1 parent 48cce2f commit 45bd07f

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
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: 969fdf419ca90c38b628de2693d00b3589d7a907
5+
refs/heads/try: 1cd5a0945a6d712ac9c9a70d53c4ef5d3f139ed0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/fuzzer/fuzzer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ fn check_variants_T<T: copy>(
286286
}
287287

288288
fn last_part(filename: str) -> str {
289-
let ix = option::get(str::rindex(filename, '/'));
289+
let ix = option::get(str::rindex_chars(filename, '/'));
290290
str::slice(filename, ix + 1u, str::len_chars(filename) - 3u)
291291
}
292292

branches/try/src/libcore/str.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export
7272
index_chars,
7373
byte_index,
7474
byte_index_from,
75-
rindex,
75+
rindex_chars,
7676
find,
7777
find_bytes,
7878
find_from_bytes,
@@ -877,11 +877,11 @@ fn byte_index_from(s: str, b: u8, start: uint, end: uint) -> option<uint> {
877877
str::as_bytes(s) { |v| vec::position_from(v, start, end) { |x| x == b } }
878878
}
879879

880-
// Function: rindex
880+
// Function: rindex_chars
881881
//
882882
// Returns the index of the first matching char
883883
// (as option some/none)
884-
fn rindex(ss: str, cc: char) -> option<uint> {
884+
fn rindex_chars(ss: str, cc: char) -> option<uint> {
885885
let bii = len_bytes(ss);
886886
let cii = len_chars(ss);
887887
while bii > 0u {
@@ -1546,11 +1546,11 @@ mod tests {
15461546
}
15471547

15481548
#[test]
1549-
fn test_rindex() {
1550-
assert (rindex("hello", 'l') == some(3u));
1551-
assert (rindex("hello", 'o') == some(4u));
1552-
assert (rindex("hello", 'h') == some(0u));
1553-
assert (rindex("hello", 'z') == none);
1549+
fn test_rindex_chars() {
1550+
assert (rindex_chars("hello", 'l') == some(3u));
1551+
assert (rindex_chars("hello", 'o') == some(4u));
1552+
assert (rindex_chars("hello", 'h') == some(0u));
1553+
assert (rindex_chars("hello", 'z') == none);
15541554
}
15551555

15561556
#[test]

branches/try/src/libstd/fs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ type path = str;
3434

3535
fn splitDirnameBasename (pp: path) -> {dirname: str, basename: str} {
3636
let ii;
37-
alt str::rindex(pp, os_fs::path_sep) {
37+
alt str::rindex_chars(pp, os_fs::path_sep) {
3838
option::some(xx) { ii = xx; }
3939
option::none {
40-
alt str::rindex(pp, os_fs::alt_path_sep) {
40+
alt str::rindex_chars(pp, os_fs::alt_path_sep) {
4141
option::some(xx) { ii = xx; }
4242
option::none { ret {dirname: ".", basename: pp}; }
4343
}

0 commit comments

Comments
 (0)