aboutsummaryrefslogtreecommitdiff
path: root/src/lib/_io.rs
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-08-04 11:24:09 -0700
committerRoy Frostig <[email protected]>2010-08-04 11:24:09 -0700
commitb9075c23c0c1d87296b338869bce37ca709cbce2 (patch)
treee8d0fab9e4ef59e1715e02dc8d9d989238bbf5ea /src/lib/_io.rs
parentBah. xfail arithmetic-interference for now; linux tinderbox is burning on it ... (diff)
downloadrust-b9075c23c0c1d87296b338869bce37ca709cbce2.tar.xz
rust-b9075c23c0c1d87296b338869bce37ca709cbce2.zip
Address _io.new_buf FIXME now that issue #93 is closed.
Diffstat (limited to 'src/lib/_io.rs')
-rw-r--r--src/lib/_io.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/lib/_io.rs b/src/lib/_io.rs
index 94021aa6..d78f8835 100644
--- a/src/lib/_io.rs
+++ b/src/lib/_io.rs
@@ -7,15 +7,7 @@ fn default_bufsz() -> uint {
}
fn new_buf() -> vec[u8] {
- let vec[u8] v = vec();
- let uint i = default_bufsz();
- while (i > 0u) {
- i -= 1u;
- v += vec(0u8);
- }
- // FIXME (issue #93): should be:
- // ret _vec.alloc[u8](default_bufsz());
- ret v;
+ ret _vec.alloc[u8](default_bufsz());
}
fn new_buf_reader(str s) -> buf_reader {