Skip to content

Commit

Permalink
Remove dead InternalBufWriter implementation
Browse files Browse the repository at this point in the history
In 8d90d3f `BufStream`, the only
consumer of `InternalBufWriter`, was removed. As implied by the name,
this type is private, hence it is currently dead code.
  • Loading branch information
ranma42 committed Jan 12, 2016
1 parent 7cffc9b commit fb82398
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,21 +772,6 @@ impl<W: Write> fmt::Debug for LineWriter<W> where W: fmt::Debug {
}
}

struct InternalBufWriter<W: Write>(BufWriter<W>);

impl<W: Read + Write> InternalBufWriter<W> {
fn get_mut(&mut self) -> &mut BufWriter<W> {
let InternalBufWriter(ref mut w) = *self;
return w;
}
}

impl<W: Read + Write> Read for InternalBufWriter<W> {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
self.get_mut().inner.as_mut().unwrap().read(buf)
}
}

#[cfg(test)]
mod tests {
use prelude::v1::*;
Expand Down

0 comments on commit fb82398

Please sign in to comment.