Skip to content

Commit 8bbe70c

Browse files
committed
Allocate less on empty reads in procsrv
1 parent b245289 commit 8bbe70c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn readclose(fd: c_int) -> ~str {
106106
let mut buf = ~"";
107107
while !reader.eof() {
108108
let bytes = reader.read_bytes(4096u);
109-
buf += str::from_bytes(bytes);
109+
str::push_str(buf, str::from_bytes(bytes));
110110
}
111111
os::fclose(file);
112112
return buf;

0 commit comments

Comments
 (0)