Rollup merge of #30850 - ranma42:cleanup-io, r=alexcrichton
In 8d90d3f368
`BufStream`, the only
consumer of `InternalBufWriter`, was removed. As implied by the name,
this type is private, hence it is currently dead code.
This commit is contained in:
commit
6ceaa2f77a
1 changed files with 0 additions and 15 deletions
|
@ -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::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue