File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ unsafe impl Send for Decompress {}
77
88impl Decompress {
99 pub fn total_in ( & self ) -> u64 {
10- self . 0 . total_in
10+ self . 0 . total_in as _
1111 }
1212
1313 pub fn total_out ( & self ) -> u64 {
14- self . 0 . total_out
14+ self . 0 . total_out as _
1515 }
1616
1717 pub fn new ( _zlib_header : bool ) -> Self {
@@ -53,7 +53,7 @@ impl Decompress {
5353 libz_rs_sys:: Z_DATA_ERROR => Err ( DecompressError ( "data error" ) ) ,
5454 libz_rs_sys:: Z_MEM_ERROR => Err ( DecompressError ( "insufficient memory" ) ) ,
5555 libz_rs_sys:: Z_NEED_DICT => Err ( DecompressError ( "need dictionary" ) ) ,
56- c => panic ! ( "unknown return code: {}" , c ) ,
56+ c => panic ! ( "unknown return code: {c}" ) ,
5757 }
5858 }
5959}
Original file line number Diff line number Diff line change @@ -29,13 +29,19 @@ pub struct Compress(Box<libz_rs_sys::z_stream>);
2929unsafe impl Sync for Compress { }
3030unsafe impl Send for Compress { }
3131
32+ impl Default for Compress {
33+ fn default ( ) -> Self {
34+ Self :: new ( )
35+ }
36+ }
37+
3238impl Compress {
3339 pub fn total_in ( & self ) -> u64 {
34- self . 0 . total_in
40+ self . 0 . total_in as _
3541 }
3642
3743 pub fn total_out ( & self ) -> u64 {
38- self . 0 . total_out
44+ self . 0 . total_out as _
3945 }
4046
4147 pub fn new ( ) -> Self {
You can’t perform that action at this time.
0 commit comments