fix recursive overflow of read()

This commit is contained in:
Sean McArthur
2014-09-27 14:09:56 -07:00
parent 30dd736067
commit 5391e7f61a

View File

@@ -59,15 +59,15 @@ impl Clone for Box<NetworkStream + Send> {
impl Reader for Box<NetworkStream + Send> { impl Reader for Box<NetworkStream + Send> {
#[inline] #[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> { impl Writer for Box<NetworkStream + Send> {
#[inline] #[inline]
fn write(&mut self, msg: &[u8]) -> IoResult<()> { self.write(msg) } fn write(&mut self, msg: &[u8]) -> IoResult<()> { (**self).write(msg) }
#[inline] #[inline]
fn flush(&mut self) -> IoResult<()> { self.flush() } fn flush(&mut self) -> IoResult<()> { (**self).flush() }
} }
/// A `NetworkListener` for `HttpStream`s. /// A `NetworkListener` for `HttpStream`s.