Allocate less on empty reads in procsrv

This commit is contained in:
Eric Holk 2012-08-16 16:45:13 -07:00
parent b2452896d1
commit 8bbe70c207
1 changed files with 1 additions and 1 deletions

View File

@ -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;