From 994a9b384d7b55ef94431155bda09fe547427b4e Mon Sep 17 00:00:00 2001 From: xgdgsc Date: Sun, 19 Mar 2023 09:17:42 +0800 Subject: [PATCH] Update src/commands/compress.rs Co-authored-by: figsoda --- src/commands/compress.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/compress.rs b/src/commands/compress.rs index 5fc5caa..353d81f 100644 --- a/src/commands/compress.rs +++ b/src/commands/compress.rs @@ -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!(),