Skip to content

Commit

Permalink
fix recursive overflow of read()
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Sep 27, 2014
1 parent 30dd736 commit 5391e7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ impl Clone for Box<NetworkStream + Send> {

impl Reader for Box<NetworkStream + Send> {
#[inline]
fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> { self.read(buf) }
fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> { (**self).read(buf) }
}

impl Writer for Box<NetworkStream + Send> {
#[inline]
fn write(&mut self, msg: &[u8]) -> IoResult<()> { self.write(msg) }
fn write(&mut self, msg: &[u8]) -> IoResult<()> { (**self).write(msg) }

#[inline]
fn flush(&mut self) -> IoResult<()> { self.flush() }
fn flush(&mut self) -> IoResult<()> { (**self).flush() }
}

/// A `NetworkListener` for `HttpStream`s.
Expand Down

0 comments on commit 5391e7f

Please sign in to comment.