File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ base64 = "0.13"
1919bigdecimal = { version = " 0.2" , features = [" serde" ] }
2020bitflags = " 1"
2121byteorder = " 1"
22- bytes = " 0.6 .0"
22+ bytes = " 1 .0"
2323chrono = { version = " 0.4" , features = [" serde" ] }
2424flate2 = { version = " 1.0" , default-features = false }
2525lazy_static = " 1"
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ pub fn compress(
7575 let mut read = 0 ;
7676 loop {
7777 dst. reserve ( max ( chunk. len ( ) . saturating_sub ( read) , 1 ) ) ;
78- let dst_buf = & mut dst. bytes_mut ( ) [ 7 + read..] ;
78+ let dst_buf = & mut dst. chunk_mut ( ) [ 7 + read..] ;
7979 match encoder. read ( & mut * slice_from_raw_parts_mut (
8080 dst_buf. as_mut_ptr ( ) ,
8181 dst_buf. len ( ) ,
@@ -315,7 +315,7 @@ impl CompDecoder {
315315 dst. reserve ( plain_len. get ( ) ) ;
316316 unsafe {
317317 let mut decoder = ZlibDecoder :: new ( & src[ ..needed. get ( ) ] ) ;
318- let dst_buf = & mut dst. bytes_mut ( ) [ ..plain_len. get ( ) ] ;
318+ let dst_buf = & mut dst. chunk_mut ( ) [ ..plain_len. get ( ) ] ;
319319 decoder. read_exact ( & mut * slice_from_raw_parts_mut (
320320 dst_buf. as_mut_ptr ( ) ,
321321 dst_buf. len ( ) ,
Original file line number Diff line number Diff line change @@ -152,8 +152,8 @@ where
152152 None => unsafe {
153153 self . in_buf . reserve ( 1 ) ;
154154 match with_interrupt ! ( self . stream. read( & mut * slice_from_raw_parts_mut(
155- self . in_buf. bytes_mut ( ) . as_mut_ptr( ) ,
156- self . in_buf. bytes_mut ( ) . len( )
155+ self . in_buf. chunk_mut ( ) . as_mut_ptr( ) ,
156+ self . in_buf. chunk_mut ( ) . len( )
157157 ) ) ) {
158158 Ok ( 0 ) => self . eof = true ,
159159 Ok ( x) => {
You can’t perform that action at this time.
0 commit comments