Skip to content

Commit 7e56612

Browse files
committed
Remove unnecessary temporary, add type annot to help inferencer (cc #2280)
1 parent 308ca06 commit 7e56612

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/test/bench/shootout-mandelbrot.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fn writer(path: ~str, writech: comm::Chan<comm::Chan<line>>, size: uint)
118118
};
119119
cout.write_line(~"P4");
120120
cout.write_line(fmt!("%u %u", size, size));
121-
let lines = std::map::uint_hash();
121+
let lines: HashMap<uint, ~[u8]> = std::map::uint_hash();
122122
let mut done = 0_u;
123123
let mut i = 0_u;
124124
while i < size {
@@ -131,10 +131,7 @@ fn writer(path: ~str, writech: comm::Chan<comm::Chan<line>>, size: uint)
131131
while prev <= i {
132132
if lines.contains_key(prev) {
133133
debug!("WS %u", prev);
134-
// FIXME (#2280): this temporary shouldn't be
135-
// necessary, but seems to be, for borrowing.
136-
let v : ~[u8] = lines.get(prev);
137-
cout.write(v);
134+
cout.write(lines.get(prev));
138135
done += 1_u;
139136
lines.remove(prev);
140137
prev += 1_u;

0 commit comments

Comments
 (0)