File tree 2 files changed +6
-2
lines changed
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> {
207
207
) -> Poll < io:: Result < usize > > {
208
208
let this = & mut * self ;
209
209
210
+ if let State :: Done = this. state {
211
+ return Poll :: Ready ( Ok ( 0 ) ) ;
212
+ }
213
+
210
214
let mut n = std:: mem:: replace ( & mut this. current , 0 ..0 ) ;
211
215
let buffer = std:: mem:: replace ( & mut this. buffer , POOL . alloc ( INITIAL_CAPACITY ) ) ;
212
216
let mut needs_read = !matches ! ( this. state, State :: Chunk ( _, _) ) ;
Original file line number Diff line number Diff line change 88
88
//! }
89
89
//! ```
90
90
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 ) ]
93
93
#![ warn( missing_docs, missing_doc_code_examples, unreachable_pub) ]
94
94
#![ cfg_attr( test, deny( warnings) ) ]
95
95
#![ allow( clippy:: if_same_then_else) ]
You can’t perform that action at this time.
0 commit comments