From 808ccd33495452e6fce56cbd7e889c88e39fccff Mon Sep 17 00:00:00 2001 From: Ben Striegel Date: Mon, 11 Feb 2013 23:18:34 -0500 Subject: [PATCH] RIMOV core::io --- src/libcore/io.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcore/io.rs b/src/libcore/io.rs index 721a6584c650..c1e47439e928 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 { // duration of its lifetime. // FIXME there really should be a better way to do this // #2004 impl Wrapper: 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());