mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-11 22:43:42 +00:00
cargo: Fix long lines
This commit is contained in:
parent
55cc110822
commit
42fb9b2c5f
@ -155,13 +155,17 @@ fn install_one_crate(c: cargo, _path: str, cf: str, _p: pkg) {
|
||||
name = str::slice(name, 0u, ri as uint);
|
||||
}
|
||||
log #fmt["Installing: %s", name];
|
||||
let old = vec::map({|x| str::slice(x, 2u, str::byte_len(x))}, fs::list_dir("."));
|
||||
let old = vec::map({|x| str::slice(x, 2u, str::byte_len(x))},
|
||||
fs::list_dir("."));
|
||||
run::run_program("rustc", [name + ".rc"]);
|
||||
let new = vec::map({|x| str::slice(x, 2u, str::byte_len(x))}, fs::list_dir("."));
|
||||
let created = vec::filter::<str>({ |n| !vec::member::<str>(n, old) }, new);
|
||||
let new = vec::map({|x| str::slice(x, 2u, str::byte_len(x))},
|
||||
fs::list_dir("."));
|
||||
let created =
|
||||
vec::filter::<str>({ |n| !vec::member::<str>(n, old) }, new);
|
||||
let exec_suffix = os::exec_suffix();
|
||||
for ct: str in created {
|
||||
if (os::exec_suffix() != "" && str::ends_with(ct, os::exec_suffix())) ||
|
||||
(os::exec_suffix() == "" && !str::starts_with(ct, "lib")) {
|
||||
if (exec_suffix != "" && str::ends_with(ct, exec_suffix)) ||
|
||||
(exec_suffix == "" && !str::starts_with(ct, "lib")) {
|
||||
log #fmt[" bin: %s", ct];
|
||||
// FIXME: need libstd fs::copy or something
|
||||
run::run_program("cp", [ct, c.bindir]);
|
||||
@ -179,7 +183,8 @@ fn install_source(c: cargo, path: str) {
|
||||
|
||||
log #fmt["contents: %s", str::connect(contents, ", ")];
|
||||
|
||||
let cratefiles = vec::filter::<str>({ |n| str::ends_with(n, ".rc") }, contents);
|
||||
let cratefiles =
|
||||
vec::filter::<str>({ |n| str::ends_with(n, ".rc") }, contents);
|
||||
|
||||
if vec::is_empty(cratefiles) {
|
||||
fail "This doesn't look like a rust package (no .rc files).";
|
||||
|
Loading…
Reference in New Issue
Block a user