about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcore/io.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/io.rs b/src/libcore/io.rs
index 721a6584c65..c1e47439e92 100644
--- a/src/libcore/io.rs
+++ b/src/libcore/io.rs
@@ -56,7 +56,7 @@ pub trait Reader {
     /// Read up to len bytes (or EOF) and put them into bytes (which
     /// must be at least len bytes long). Return number of bytes read.
     // FIXME (#2982): This should probably return an error.
-    fn read(&self, bytes: &[mut u8], len: uint) -> uint;
+    fn read(&self, bytes: &mut [u8], len: uint) -> uint;
 
     /// Read a single byte, returning a negative value for EOF or read error.
     fn read_byte(&self) -> int;
@@ -416,7 +416,7 @@ fn convert_whence(whence: SeekStyle) -> i32 {
 }
 
 impl *libc::FILE: Reader {
-    fn read(&self, bytes: &[mut u8], len: uint) -> uint {
+    fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         unsafe {
             do vec::as_mut_buf(bytes) |buf_p, buf_len| {
                 assert buf_len >= len;
@@ -461,7 +461,7 @@ struct Wrapper<T, C> {
 // duration of its lifetime.
 // FIXME there really should be a better way to do this // #2004
 impl<R: Reader, C> Wrapper<R, C>: Reader {
-    fn read(&self, bytes: &[mut u8], len: uint) -> uint {
+    fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         self.base.read(bytes, len)
     }
     fn read_byte(&self) -> int { self.base.read_byte() }
@@ -528,7 +528,7 @@ pub struct BytesReader {
 }
 
 impl BytesReader: Reader {
-    fn read(&self, bytes: &[mut u8], len: uint) -> uint {
+    fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         let count = uint::min(len, self.bytes.len() - self.pos);
 
         let view = vec::view(self.bytes, self.pos, self.bytes.len());