(&mut self, buf: &[u8])
| 88 | |
| 89 | impl<D: Digest, W: io::Write> io::Write for HashWriter<D, W> { |
| 90 | fn write(&mut self, buf: &[u8]) -> io::Result<usize> { |
| 91 | let bytes = self.writer.write(buf)?; |
| 92 | |
| 93 | if bytes > 0 { |
| 94 | self.hasher.update(&buf[0..bytes]); |
| 95 | } |
| 96 | |
| 97 | Ok(bytes) |
| 98 | } |
| 99 | |
| 100 | fn flush(&mut self) -> io::Result<()> { |
| 101 | self.writer.flush() |
nothing calls this directly
no outgoing calls
no test coverage detected