Skip to content

Commit 808ccd3

Browse files
committed
RIMOV core::io
1 parent 3a3f7b8 commit 808ccd3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/io.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub trait Reader {
5656
/// Read up to len bytes (or EOF) and put them into bytes (which
5757
/// must be at least len bytes long). Return number of bytes read.
5858
// FIXME (#2982): This should probably return an error.
59-
fn read(&self, bytes: &[mut u8], len: uint) -> uint;
59+
fn read(&self, bytes: &mut [u8], len: uint) -> uint;
6060

6161
/// Read a single byte, returning a negative value for EOF or read error.
6262
fn read_byte(&self) -> int;
@@ -416,7 +416,7 @@ fn convert_whence(whence: SeekStyle) -> i32 {
416416
}
417417

418418
impl *libc::FILE: Reader {
419-
fn read(&self, bytes: &[mut u8], len: uint) -> uint {
419+
fn read(&self, bytes: &mut [u8], len: uint) -> uint {
420420
unsafe {
421421
do vec::as_mut_buf(bytes) |buf_p, buf_len| {
422422
assert buf_len >= len;
@@ -461,7 +461,7 @@ struct Wrapper<T, C> {
461461
// duration of its lifetime.
462462
// FIXME there really should be a better way to do this // #2004
463463
impl<R: Reader, C> Wrapper<R, C>: Reader {
464-
fn read(&self, bytes: &[mut u8], len: uint) -> uint {
464+
fn read(&self, bytes: &mut [u8], len: uint) -> uint {
465465
self.base.read(bytes, len)
466466
}
467467
fn read_byte(&self) -> int { self.base.read_byte() }
@@ -528,7 +528,7 @@ pub struct BytesReader {
528528
}
529529
530530
impl BytesReader: Reader {
531-
fn read(&self, bytes: &[mut u8], len: uint) -> uint {
531+
fn read(&self, bytes: &mut [u8], len: uint) -> uint {
532532
let count = uint::min(len, self.bytes.len() - self.pos);
533533
534534
let view = vec::view(self.bytes, self.pos, self.bytes.len());

0 commit comments

Comments
 (0)