Skip to content

Commit e364584

Browse files
committed
Fix infinite recursion in Writer impl for &mut Writer
Closes issue #17767
1 parent 20f4c45 commit e364584

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/io/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,10 +1293,10 @@ impl<'a> Writer for Box<Writer+'a> {
12931293

12941294
impl<'a> Writer for &'a mut Writer+'a {
12951295
#[inline]
1296-
fn write(&mut self, buf: &[u8]) -> IoResult<()> { self.write(buf) }
1296+
fn write(&mut self, buf: &[u8]) -> IoResult<()> { (**self).write(buf) }
12971297

12981298
#[inline]
1299-
fn flush(&mut self) -> IoResult<()> { self.flush() }
1299+
fn flush(&mut self) -> IoResult<()> { (**self).flush() }
13001300
}
13011301

13021302
/// A `RefWriter` is a struct implementing `Writer` which contains a reference

0 commit comments

Comments
 (0)