@@ -43,6 +43,7 @@ pub struct Decompress {
43
43
/// in-memory data.
44
44
#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
45
45
#[ non_exhaustive]
46
+ #[ allow( clippy:: unnecessary_cast) ]
46
47
pub enum FlushCompress {
47
48
/// A typical parameter for passing to compression/decompression functions,
48
49
/// this indicates that the underlying stream to decide how much data to
@@ -86,6 +87,7 @@ pub enum FlushCompress {
86
87
/// decompressing in-memory data.
87
88
#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
88
89
#[ non_exhaustive]
90
+ #[ allow( clippy:: unnecessary_cast) ]
89
91
pub enum FlushDecompress {
90
92
/// A typical parameter for passing to compression/decompression functions,
91
93
/// this indicates that the underlying stream to decide how much data to
@@ -277,6 +279,7 @@ impl Compress {
277
279
278
280
match rc {
279
281
ffi:: MZ_STREAM_ERROR => compress_failed ( self . inner . inner . msg ( ) ) ,
282
+ #[ allow( clippy:: unnecessary_cast) ]
280
283
ffi:: MZ_OK => Ok ( unsafe { ( * stream) . adler } as u32 ) ,
281
284
c => panic ! ( "unknown return code: {}" , c) ,
282
285
}
@@ -493,6 +496,7 @@ impl Decompress {
493
496
ffi:: inflateSetDictionary ( stream, dictionary. as_ptr ( ) , dictionary. len ( ) as ffi:: uInt )
494
497
} ;
495
498
499
+ #[ allow( clippy:: unnecessary_cast) ]
496
500
match rc {
497
501
ffi:: MZ_STREAM_ERROR => decompress_failed ( self . inner . inner . msg ( ) ) ,
498
502
ffi:: MZ_DATA_ERROR => decompress_need_dict ( unsafe { ( * stream) . adler } as u32 ) ,
0 commit comments