We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1567c81 + b7bd31a commit cdae651Copy full SHA for cdae651
src/gz/mod.rs
@@ -115,7 +115,7 @@ impl GzHeaderParser {
115
}
116
117
118
- fn parse<'a, R: Read>(&mut self, r: &'a mut R) -> Result<()> {
+ fn parse<'a, R: BufRead>(&mut self, r: &'a mut R) -> Result<()> {
119
loop {
120
match &mut self.state {
121
GzHeaderState::Start(count, buffer) => {
@@ -248,7 +248,7 @@ fn read_into<R: Read>(r: &mut R, buffer: &mut [u8]) -> Result<usize> {
248
249
250
// Read `r` up to the first nul byte, pushing non-nul bytes to `buffer`.
251
-fn read_to_nul<R: Read>(r: &mut R, buffer: &mut Vec<u8>) -> Result<()> {
+fn read_to_nul<R: BufRead>(r: &mut R, buffer: &mut Vec<u8>) -> Result<()> {
252
let mut bytes = r.bytes();
253
254
match bytes.next().transpose()? {
0 commit comments