Fix: clippy warning in rust 1.66.0

This commit is contained in:
Bo Zhang authored and dlhxzb committed 2023-01-06 18:48:18 +09:00
1 parent d7b2060a5b
commit 60a6d672c5
18 files changed
+355 -409

No files matched your search

+1 -6
View File
@@ -32,12 +32,7 @@ pub fn decompress(data: &[u8]) -> Vec<u8> {
const MAX: usize = 1024 * 1024 * 64;
const MIN: usize = 1024 * 1024;
let mut n = 30 * data.len();
if n > MAX {
n = MAX;
}
if n < MIN {
n = MIN;
}
n = n.clamp(MIN, MAX);
match d.decompress(data, n) {
Ok(res) => out = res,
Err(err) => {