Update src/commands/compress.rs

Co-authored-by: figsoda <figsoda@pm.me>
This commit is contained in:
xgdgsc 2023-03-19 09:17:42 +08:00 committed by GitHub
parent e92b9ff723
commit 994a9b384d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,8 +79,8 @@ pub fn compress_files(
}),
);
// Safety:
// Encoder::new() can only fail if `level` is invalid, but Default::default()
// is guaranteed to be valid
// Encoder::new() can only fail if `level` is invalid, but the level
// is `clamp`ed and therefore guaranteed to be valid
Box::new(zstd_encoder.unwrap().auto_finish())
}
Tar | Zip => unreachable!(),