Skip to content

Commit 4055001

Browse files
committed
test: Fix shootout-mandelbrot.rs. rs=bustage
1 parent 3464f60 commit 4055001

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/test/bench/shootout-mandelbrot.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl cmplx : ops::Mul<cmplx,cmplx> {
3333
}
3434

3535
impl cmplx : ops::Add<cmplx,cmplx> {
36-
pure fn add(x: &cmplx) -> cmplx {
36+
pure fn add(&self, x: &cmplx) -> cmplx {
3737
cmplx {
3838
re: self.re + (*x).re,
3939
im: self.im + (*x).im
@@ -145,7 +145,7 @@ fn writer(path: ~str, writech: comm::Chan<comm::Chan<line>>, size: uint)
145145
}
146146
else {
147147
debug!("S %u", aline.i);
148-
lines.insert(aline.i, aline.b);
148+
lines.insert(aline.i, copy aline.b); // FIXME: bad for perf
149149
};
150150
i += 1_u;
151151
}
@@ -160,7 +160,7 @@ fn main() {
160160
};
161161

162162
let path = if vec::len(args) < 4_u { ~"" }
163-
else { args[3] };
163+
else { copy args[3] }; // FIXME: bad for perf
164164

165165
let yieldevery = if vec::len(args) < 3_u { 10_u }
166166
else { uint::from_str(args[2]).get() };
@@ -170,8 +170,8 @@ fn main() {
170170

171171
let writep = comm::Port();
172172
let writech = comm::Chan(&writep);
173-
do task::spawn {
174-
writer(path, writech, size);
173+
do task::spawn |move path| {
174+
writer(copy path, writech, size);
175175
};
176176
let ch = comm::recv(writep);
177177
for uint::range(0_u, size) |j| {

0 commit comments

Comments
 (0)