Skip to content

Commit 42fb9b2

Browse files
committed
cargo: Fix long lines
1 parent 55cc110 commit 42fb9b2

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/cargo/cargo.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,17 @@ fn install_one_crate(c: cargo, _path: str, cf: str, _p: pkg) {
155155
name = str::slice(name, 0u, ri as uint);
156156
}
157157
log #fmt["Installing: %s", name];
158-
let old = vec::map({|x| str::slice(x, 2u, str::byte_len(x))}, fs::list_dir("."));
158+
let old = vec::map({|x| str::slice(x, 2u, str::byte_len(x))},
159+
fs::list_dir("."));
159160
run::run_program("rustc", [name + ".rc"]);
160-
let new = vec::map({|x| str::slice(x, 2u, str::byte_len(x))}, fs::list_dir("."));
161-
let created = vec::filter::<str>({ |n| !vec::member::<str>(n, old) }, new);
161+
let new = vec::map({|x| str::slice(x, 2u, str::byte_len(x))},
162+
fs::list_dir("."));
163+
let created =
164+
vec::filter::<str>({ |n| !vec::member::<str>(n, old) }, new);
165+
let exec_suffix = os::exec_suffix();
162166
for ct: str in created {
163-
if (os::exec_suffix() != "" && str::ends_with(ct, os::exec_suffix())) ||
164-
(os::exec_suffix() == "" && !str::starts_with(ct, "lib")) {
167+
if (exec_suffix != "" && str::ends_with(ct, exec_suffix)) ||
168+
(exec_suffix == "" && !str::starts_with(ct, "lib")) {
165169
log #fmt[" bin: %s", ct];
166170
// FIXME: need libstd fs::copy or something
167171
run::run_program("cp", [ct, c.bindir]);
@@ -179,7 +183,8 @@ fn install_source(c: cargo, path: str) {
179183

180184
log #fmt["contents: %s", str::connect(contents, ", ")];
181185

182-
let cratefiles = vec::filter::<str>({ |n| str::ends_with(n, ".rc") }, contents);
186+
let cratefiles =
187+
vec::filter::<str>({ |n| str::ends_with(n, ".rc") }, contents);
183188

184189
if vec::is_empty(cratefiles) {
185190
fail "This doesn't look like a rust package (no .rc files).";

0 commit comments

Comments
 (0)