Skip to content

Commit abb7743

Browse files
committed
---
yaml --- r: 44408 b: refs/heads/master c: 808ccd3 h: refs/heads/master v: v3
1 parent fb9dc1a commit abb7743

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 3a3f7b8e557aa9ff8e99a11c826ffc6e1147e414
2+
refs/heads/master: 808ccd33495452e6fce56cbd7e889c88e39fccff
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/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)