Skip to content

Commit

Permalink
Update to master
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Sep 17, 2014
1 parent 6a182b2 commit 1551287
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/gz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl<W: Writer> EncoderWriter<W> {
impl<W: Writer> Writer for EncoderWriter<W> {
fn write(&mut self, buf: &[u8]) -> IoResult<()> {
if self.header.len() != 0 {
try!(self.inner.inner.get_mut_ref().write(self.header.as_slice()));
try!(self.inner.inner.as_mut().unwrap().write(self.header.as_slice()));
self.header.truncate(0);
}
try!(self.inner.write(buf));
Expand Down Expand Up @@ -288,7 +288,7 @@ impl<R: Reader> Reader for EncoderReader<R> {
} else if self.pos < self.header.len() {
amt += copy(into, self.header.as_slice(), &mut self.pos);
if amt == into.len() { return Ok(amt) }
let tmp = into; into = tmp.mut_slice_from(amt);
let tmp = into; into = tmp.slice_from_mut(amt);
}
match self.inner.read(into) {
Ok(a) => Ok(amt + a),
Expand Down
4 changes: 2 additions & 2 deletions src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl Stream {

self.next_in = buf.slice_from(*pos).as_ptr();
self.avail_in = (buf.len() - *pos) as libc::c_uint;
self.next_out = into.mut_slice_from(read).as_mut_ptr();
self.next_out = into.slice_from_mut(read).as_mut_ptr();
self.avail_out = (into.len() - read) as libc::c_uint;

let before_out = self.total_out;
Expand Down Expand Up @@ -239,7 +239,7 @@ impl Stream {
self.next_in = buf.as_ptr();
self.avail_in = buf.len() as libc::c_uint;
let cur_len = into.len();
self.next_out = into.mut_slice_from(cur_len).as_mut_ptr();
self.next_out = into.slice_from_mut(cur_len).as_mut_ptr();
self.avail_out = (cap - cur_len) as libc::c_uint;

let before_out = self.total_out;
Expand Down

0 comments on commit 1551287

Please sign in to comment.