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 {}
7
7
8
8
impl Decompress {
9
9
pub fn total_in ( & self ) -> u64 {
10
- self . 0 . total_in
10
+ self . 0 . total_in as _
11
11
}
12
12
13
13
pub fn total_out ( & self ) -> u64 {
14
- self . 0 . total_out
14
+ self . 0 . total_out as _
15
15
}
16
16
17
17
pub fn new ( _zlib_header : bool ) -> Self {
@@ -53,7 +53,7 @@ impl Decompress {
53
53
libz_rs_sys:: Z_DATA_ERROR => Err ( DecompressError ( "data error" ) ) ,
54
54
libz_rs_sys:: Z_MEM_ERROR => Err ( DecompressError ( "insufficient memory" ) ) ,
55
55
libz_rs_sys:: Z_NEED_DICT => Err ( DecompressError ( "need dictionary" ) ) ,
56
- c => panic ! ( "unknown return code: {}" , c ) ,
56
+ c => panic ! ( "unknown return code: {c}" ) ,
57
57
}
58
58
}
59
59
}
Original file line number Diff line number Diff line change @@ -29,13 +29,19 @@ pub struct Compress(Box<libz_rs_sys::z_stream>);
29
29
unsafe impl Sync for Compress { }
30
30
unsafe impl Send for Compress { }
31
31
32
+ impl Default for Compress {
33
+ fn default ( ) -> Self {
34
+ Self :: new ( )
35
+ }
36
+ }
37
+
32
38
impl Compress {
33
39
pub fn total_in ( & self ) -> u64 {
34
- self . 0 . total_in
40
+ self . 0 . total_in as _
35
41
}
36
42
37
43
pub fn total_out ( & self ) -> u64 {
38
- self . 0 . total_out
44
+ self . 0 . total_out as _
39
45
}
40
46
41
47
pub fn new ( ) -> Self {
You can’t perform that action at this time.
0 commit comments