about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-11-24 14:11:31 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-11-24 14:39:21 -0800
commit455d73cb861bb0aca989fc8aca19c025ebf6f4ed (patch)
tree15b8e1b386a7622372e82131f8372cb416a9b9aa /src/libcore
parentfa66f3ec18a136addc71fd82300febdd6cf787e9 (diff)
[libs] Remove unread_byte method from core::io::Reader
Method isn't used. See discussion on #2738 and #4031

Closes #2738
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/io.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/libcore/io.rs b/src/libcore/io.rs
index 3c2318d2ed0..fc9b9a4e889 100644
--- a/src/libcore/io.rs
+++ b/src/libcore/io.rs
@@ -44,9 +44,6 @@ pub trait Reader {
     /// Read a single byte, returning a negative value for EOF or read error.
     fn read_byte() -> int;
 
-    /// Behaves like the libc function ungetc.
-    fn unread_byte(int);
-
     /// Return whether the stream is currently at EOF position.
     fn eof() -> bool;
 
@@ -413,7 +410,6 @@ impl *libc::FILE: Reader {
         }
     }
     fn read_byte() -> int { return libc::fgetc(self) as int; }
-    fn unread_byte(byte: int) { libc::ungetc(byte as c_int, self); }
     fn eof() -> bool { return libc::feof(self) != 0 as c_int; }
     fn seek(offset: int, whence: SeekStyle) {
         assert libc::fseek(self, offset as c_long, convert_whence(whence))
@@ -430,7 +426,6 @@ impl<T: Reader, C> {base: T, cleanup: C}: Reader {
         self.base.read(bytes, len)
     }
     fn read_byte() -> int { self.base.read_byte() }
-    fn unread_byte(byte: int) { self.base.unread_byte(byte); }
     fn eof() -> bool { self.base.eof() }
     fn seek(off: int, whence: SeekStyle) { self.base.seek(off, whence) }
     fn tell() -> uint { self.base.tell() }
@@ -498,8 +493,6 @@ impl BytesReader: Reader {
         self.pos += 1u;
         return b as int;
     }
-    // FIXME (#2738): implement this
-    fn unread_byte(_byte: int) { error!("Unimplemented: unread_byte"); fail; }
     fn eof() -> bool { self.pos == self.bytes.len() }
     fn seek(offset: int, whence: SeekStyle) {
         let pos = self.pos;