about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-08-16 16:45:13 -0700
committerEric Holk <eric.holk@gmail.com>2012-08-16 16:46:20 -0700
commit8bbe70c207482950585fd7d666cb2bf634fea52b (patch)
tree68ffdbe8f449654d8f7e1db60302ddd9a2463b45
parentb2452896d195ce2e8409244e177e04c55cf8a75c (diff)
downloadrust-8bbe70c207482950585fd7d666cb2bf634fea52b.tar.gz
rust-8bbe70c207482950585fd7d666cb2bf634fea52b.zip
Allocate less on empty reads in procsrv
-rw-r--r--src/compiletest/procsrv.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiletest/procsrv.rs b/src/compiletest/procsrv.rs
index aab08ffffe7..312c48a2406 100644
--- a/src/compiletest/procsrv.rs
+++ b/src/compiletest/procsrv.rs
@@ -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;