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
@ -772,21 +772,6 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
}
|
||||
}
|
||||
|
||||
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…
Reference in New Issue
Block a user