Skip to content

Commit

Permalink
Allocate less on empty reads in procsrv
Browse files Browse the repository at this point in the history
  • Loading branch information
eholk committed Aug 16, 2012
1 parent b245289 commit 8bbe70c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiletest/procsrv.rs
Expand Up @@ -106,7 +106,7 @@ fn readclose(fd: c_int) -> ~str {
let mut buf = ~"";
while !reader.eof() {
let bytes = reader.read_bytes(4096u);
buf += str::from_bytes(bytes);
str::push_str(buf, str::from_bytes(bytes));
}
os::fclose(file);
return buf;
Expand Down

0 comments on commit 8bbe70c

Please sign in to comment.