Skip to content

Commit

Permalink
remove accidental double-mut
Browse files Browse the repository at this point in the history
  • Loading branch information
jbr committed Nov 28, 2020
1 parent 356847b commit ed6f181
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chunked/encoder.rs
Expand Up @@ -40,11 +40,11 @@ impl<R: Read + Unpin> Read for ChunkedEncoder<R> {
if self.done {
return Poll::Ready(Ok(0));
}
let mut reader = &mut self.reader;
let reader = &mut self.reader;

let max_bytes_to_read = max_bytes_to_read(buf.len());

let bytes = ready!(Pin::new(&mut reader).poll_read(cx, &mut buf[..max_bytes_to_read]))?;
let bytes = ready!(Pin::new(reader).poll_read(cx, &mut buf[..max_bytes_to_read]))?;
if bytes == 0 {
self.done = true;
}
Expand Down

0 comments on commit ed6f181

Please sign in to comment.