Skip to content

Commit 0f00d9a

Browse files
committed
Adjust fuzzer and cargo to changes in core::str API
1 parent 780f827 commit 0f00d9a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/cargo/cargo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ fn cmd_install(c: cargo) unsafe {
686686

687687
if str::starts_with(target, "uuid:") {
688688
let uuid = rest(target, 5u);
689-
alt str::index(uuid, '/') {
689+
alt str::find_char(uuid, '/') {
690690
option::some(idx) {
691691
let source = str::slice(uuid, 0u, idx);
692692
uuid = str::slice(uuid, idx + 1u, str::len(uuid));
@@ -698,7 +698,7 @@ fn cmd_install(c: cargo) unsafe {
698698
}
699699
} else {
700700
let name = target;
701-
alt str::index(name, '/') {
701+
alt str::find_char(name, '/') {
702702
option::some(idx) {
703703
let source = str::slice(name, 0u, idx);
704704
name = str::slice(name, idx + 1u, str::len(name));

src/cargo/pgp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn verify(root: str, data: str, sig: str, keyfp: str) -> bool {
9494
let p = gpg(["--homedir", path, "--with-fingerprint", "--verify", sig,
9595
data]);
9696
let res = "Primary key fingerprint: " + keyfp;
97-
for line in str::split_byte(p.err, '\n' as u8) {
97+
for line in str::split_char(p.err, '\n') {
9898
if line == res {
9999
ret true;
100100
}

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::rfind_char(filename, '/'));
290290
str::slice(filename, ix + 1u, str::len(filename) - 3u)
291291
}
292292

0 commit comments

Comments
 (0)