@@ -56,7 +56,7 @@ pub trait Reader {
56
56
/// Read up to len bytes (or EOF) and put them into bytes (which
57
57
/// must be at least len bytes long). Return number of bytes read.
58
58
// 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 ;
60
60
61
61
/// Read a single byte, returning a negative value for EOF or read error.
62
62
fn read_byte ( & self ) -> int ;
@@ -416,7 +416,7 @@ fn convert_whence(whence: SeekStyle) -> i32 {
416
416
}
417
417
418
418
impl * libc:: FILE : Reader {
419
- fn read ( & self , bytes : & [ mut u8] , len : uint ) -> uint {
419
+ fn read ( & self , bytes : & mut [ u8 ] , len : uint ) -> uint {
420
420
unsafe {
421
421
do vec:: as_mut_buf ( bytes) |buf_p, buf_len| {
422
422
assert buf_len >= len;
@@ -461,7 +461,7 @@ struct Wrapper<T, C> {
461
461
// duration of its lifetime.
462
462
// FIXME there really should be a better way to do this // #2004
463
463
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 {
465
465
self . base . read ( bytes, len)
466
466
}
467
467
fn read_byte ( & self ) -> int { self . base . read_byte ( ) }
@@ -528,7 +528,7 @@ pub struct BytesReader {
528
528
}
529
529
530
530
impl BytesReader: Reader {
531
- fn read(&self, bytes: &[ mut u8], len: uint) -> uint {
531
+ fn read(&self, bytes: &mut [ u8], len: uint) -> uint {
532
532
let count = uint::min(len, self.bytes.len() - self.pos);
533
533
534
534
let view = vec::view(self.bytes, self.pos, self.bytes.len());
0 commit comments