aboutsummaryrefslogtreecommitdiff
path: root/src/lib/_io.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-27 19:21:51 -0700
committerGraydon Hoare <[email protected]>2010-07-27 19:21:51 -0700
commit80307576245aabf00285db020bbfbc4c3a891766 (patch)
tree7e408956ca3e895844dd30a1afddf64d83157da0 /src/lib/_io.rs
parentCalm some LLVM indigestion of last change. (diff)
downloadrust-80307576245aabf00285db020bbfbc4c3a891766.tar.xz
rust-80307576245aabf00285db020bbfbc4c3a891766.zip
Switch machine-type lexemes to use suffixes. Remove support for foo(bar) as a cast notation. Closes #129.
Diffstat (limited to 'src/lib/_io.rs')
-rw-r--r--src/lib/_io.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/_io.rs b/src/lib/_io.rs
index e171e617..94021aa6 100644
--- a/src/lib/_io.rs
+++ b/src/lib/_io.rs
@@ -3,15 +3,15 @@ type buf_reader = unsafe obj {
};
fn default_bufsz() -> uint {
- ret uint(4096);
+ ret 4096u;
}
fn new_buf() -> vec[u8] {
let vec[u8] v = vec();
let uint i = default_bufsz();
- while (i > uint(0)) {
- i -= uint(1);
- v += vec(u8(0));
+ while (i > 0u) {
+ i -= 1u;
+ v += vec(0u8);
}
// FIXME (issue #93): should be:
// ret _vec.alloc[u8](default_bufsz());
@@ -25,7 +25,7 @@ fn new_buf_reader(str s) -> buf_reader {
fn read() -> vec[u8] {
// Ensure our buf is singly-referenced.
- if (_vec.rustrt.refcount[u8](buf) != uint(1)) {
+ if (_vec.rustrt.refcount[u8](buf) != 1u) {
buf = new_buf();
}