Adjust fuzzer and cargo to changes in core::str API
This commit is contained in:
parent
780f8277f4
commit
0f00d9a797
@ -686,7 +686,7 @@ fn cmd_install(c: cargo) unsafe {
|
||||
|
||||
if str::starts_with(target, "uuid:") {
|
||||
let uuid = rest(target, 5u);
|
||||
alt str::index(uuid, '/') {
|
||||
alt str::find_char(uuid, '/') {
|
||||
option::some(idx) {
|
||||
let source = str::slice(uuid, 0u, idx);
|
||||
uuid = str::slice(uuid, idx + 1u, str::len(uuid));
|
||||
@ -698,7 +698,7 @@ fn cmd_install(c: cargo) unsafe {
|
||||
}
|
||||
} else {
|
||||
let name = target;
|
||||
alt str::index(name, '/') {
|
||||
alt str::find_char(name, '/') {
|
||||
option::some(idx) {
|
||||
let source = str::slice(name, 0u, idx);
|
||||
name = str::slice(name, idx + 1u, str::len(name));
|
||||
|
@ -94,7 +94,7 @@ fn verify(root: str, data: str, sig: str, keyfp: str) -> bool {
|
||||
let p = gpg(["--homedir", path, "--with-fingerprint", "--verify", sig,
|
||||
data]);
|
||||
let res = "Primary key fingerprint: " + keyfp;
|
||||
for line in str::split_byte(p.err, '\n' as u8) {
|
||||
for line in str::split_char(p.err, '\n') {
|
||||
if line == res {
|
||||
ret true;
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ fn check_variants_T<T: copy>(
|
||||
}
|
||||
|
||||
fn last_part(filename: str) -> str {
|
||||
let ix = option::get(str::rindex(filename, '/'));
|
||||
let ix = option::get(str::rfind_char(filename, '/'));
|
||||
str::slice(filename, ix + 1u, str::len(filename) - 3u)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user