File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,10 @@ impl<R: Read + Unpin> Read for ChunkedDecoder<R> {
207207 ) -> Poll < io:: Result < usize > > {
208208 let this = & mut * self ;
209209
210+ if let State :: Done = this. state {
211+ return Poll :: Ready ( Ok ( 0 ) ) ;
212+ }
213+
210214 let mut n = std:: mem:: replace ( & mut this. current , 0 ..0 ) ;
211215 let buffer = std:: mem:: replace ( & mut this. buffer , POOL . alloc ( INITIAL_CAPACITY ) ) ;
212216 let mut needs_read = !matches ! ( this. state, State :: Chunk ( _, _) ) ;
Original file line number Diff line number Diff line change 8888//! }
8989//! ```
9090
91- #![ forbid( unsafe_code, rust_2018_idioms ) ]
92- #![ deny( missing_debug_implementations, nonstandard_style) ]
91+ #![ forbid( unsafe_code) ]
92+ #![ deny( missing_debug_implementations, nonstandard_style, rust_2018_idioms ) ]
9393#![ warn( missing_docs, missing_doc_code_examples, unreachable_pub) ]
9494#![ cfg_attr( test, deny( warnings) ) ]
9595#![ allow( clippy:: if_same_then_else) ]
You can’t perform that action at this time.
0 commit comments