diff options
| author | Brian Koropoff <bkoropoff@gmail.com> | 2014-10-04 10:23:26 -0700 |
|---|---|---|
| committer | Brian Koropoff <bkoropoff@gmail.com> | 2014-10-04 10:24:10 -0700 |
| commit | e364584071d3cd7a8e553ba05c9a1994e50c3f0e (patch) | |
| tree | 698ecf2f566c082b8cd1a72e37f0e7334a4413e9 /src/libstd/io | |
| parent | 20f4c45bade89f0a8df5297811af3d9f8b91d075 (diff) | |
| download | rust-e364584071d3cd7a8e553ba05c9a1994e50c3f0e.tar.gz rust-e364584071d3cd7a8e553ba05c9a1994e50c3f0e.zip | |
Fix infinite recursion in Writer impl for &mut Writer
Closes issue #17767
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index b929e7c464d..c645e5240b8 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -1293,10 +1293,10 @@ impl<'a> Writer for Box<Writer+'a> { impl<'a> Writer for &'a mut Writer+'a { #[inline] - fn write(&mut self, buf: &[u8]) -> IoResult<()> { self.write(buf) } + fn write(&mut self, buf: &[u8]) -> IoResult<()> { (**self).write(buf) } #[inline] - fn flush(&mut self) -> IoResult<()> { self.flush() } + fn flush(&mut self) -> IoResult<()> { (**self).flush() } } /// A `RefWriter` is a struct implementing `Writer` which contains a reference |
