Skip to content

Commit a8419cf

Browse files
committed
---
yaml --- r: 6731 b: refs/heads/master c: 42fb9b2 h: refs/heads/master i: 6729: 3fb65f8 6727: f7bbc10 v: v3
1 parent 16db699 commit a8419cf

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 55cc110822d4852e125d32321b966470def6979e
2+
refs/heads/master: 42fb9b2c5f0c791e2c369b2ec0562c968aed00de

trunk/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)