Skip to content

Commit 7bd003a

Browse files
author
Elly Jones
committed
cargo: remove obsolete rust-pkg-index lookup code
1 parent 9a0b89b commit 7bd003a

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/cargo/cargo.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -373,28 +373,6 @@ fn install_file(c: cargo, wd: str, path: str) {
373373
install_source(c, wd);
374374
}
375375

376-
fn install_resolved(c: cargo, wd: str, key: str) {
377-
fs::remove_dir(wd);
378-
let u = "https://rust-package-index.appspot.com/pkg/" + key;
379-
let p = run::program_output("curl", [u]);
380-
if p.status != 0 {
381-
fail #fmt["Fetch of %s failed: %s", u, p.err];
382-
}
383-
let j = json::from_str(p.out);
384-
alt j {
385-
some (json::dict(_j)) {
386-
alt _j.find("install") {
387-
some (json::string(g)) {
388-
log #fmt["Resolved: %s -> %s", key, g];
389-
cmd_install(c, ["cargo", "install", g]);
390-
}
391-
_ { fail #fmt["Bogus install: '%s'", p.out]; }
392-
}
393-
}
394-
_ { fail #fmt["Bad json: '%s'", p.out]; }
395-
}
396-
}
397-
398376
fn install_package(c: cargo, wd: str, pkg: package) {
399377
info("Installing with " + pkg.method + " from " + pkg.url + "...");
400378
if pkg.method == "git" {

0 commit comments

Comments
 (0)