File tree Expand file tree Collapse file tree 5 files changed +6
-10
lines changed Expand file tree Collapse file tree 5 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use header_plz::body_headers::encoding_info::EncodingInfo;
55use header_plz:: body_headers:: transfer_types:: TransferType ;
66
77use crate :: chunked:: chunked_to_raw;
8- use crate :: content_length:: { add_body_and_update_cl, update_content_length } ;
8+ use crate :: content_length:: add_body_and_update_cl;
99use crate :: decompress_trait:: DecompressTrait ;
1010
1111#[ cfg_attr( test, derive( PartialEq ) ) ]
@@ -46,12 +46,12 @@ where
4646 self . body_headers
4747 . as_ref ( )
4848 . and_then ( |bh| bh. transfer_type . as_ref ( ) )
49- . and_then ( |tt| Some ( tt == & TransferType :: Chunked ) )
49+ . map ( |tt| tt == & TransferType :: Chunked )
5050 . unwrap_or ( false )
5151 }
5252
5353 pub fn chunked_to_raw ( & mut self ) {
54- chunked_to_raw ( self . message , & mut self . buf ) ;
54+ chunked_to_raw ( self . message , self . buf ) ;
5555 self . body = self . message . get_body ( ) . into_bytes ( ) . unwrap ( ) ;
5656 }
5757
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ impl<'a> DecompressionStruct<'a> {
179179 if e. is_corrupt ( ) {
180180 let ( header_index, compression_index) =
181181 self . last_header_compression_index ( ) ;
182- e. from_corrupt_to_partial (
182+ e. corrupt_to_partial (
183183 input,
184184 header_index,
185185 compression_index,
@@ -199,7 +199,6 @@ mod tests {
199199 use tests_utils:: * ;
200200
201201 use crate :: decompression:: multi:: error:: MultiDecompressErrorReason ;
202- use crate :: decompression:: single:: error:: DecompressError ;
203202
204203 use super :: * ;
205204
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ impl MultiDecompressError {
3232 matches ! ( self . error, DecompressError :: Unknown ( _) )
3333 }
3434
35- pub fn from_corrupt_to_partial (
35+ pub fn corrupt_to_partial (
3636 mut self ,
3737 partial_body : BytesMut ,
3838 header_index : usize ,
Original file line number Diff line number Diff line change 1- #![ allow( warnings, unused) ]
2-
31use bytes:: BytesMut ;
42
53use crate :: state:: DecodeState ;
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ use std::cmp::Ordering;
33use body_plz:: variants:: Body ;
44use bytes:: BytesMut ;
55use header_plz:: body_headers:: encoding_info:: EncodingInfo ;
6- use tracing:: error;
76
87use crate :: {
98 decode_struct:: DecodeStruct ,
4443 } else if decode_struct. extra_body_is_some ( ) {
4544 Self :: UpdateContentLength ( decode_struct)
4645 } else {
47- let mut body = decode_struct. take_main_body ( ) ;
46+ let body = decode_struct. take_main_body ( ) ;
4847 decode_struct. message . set_body ( Body :: Raw ( body) ) ;
4948 Self :: End
5049 } ;
You can’t perform that action at this time.
0 commit comments