feat: optimize code
This commit is contained in:
@@ -188,7 +188,6 @@ pub fn decrypt_single(config: &Option<TinyEncryptConfig>,
|
||||
}
|
||||
|
||||
// Decrypt to file
|
||||
let compressed_desc = iff!(meta.compress, " [compressed]", "");
|
||||
let start = Instant::now();
|
||||
|
||||
let mut file_out = File::create(path_out)?;
|
||||
@@ -199,7 +198,11 @@ pub fn decrypt_single(config: &Option<TinyEncryptConfig>,
|
||||
util_file::update_file_time(enc_meta, path_out);
|
||||
|
||||
let encrypt_duration = start.elapsed();
|
||||
debugging!("Inner decrypt file{}: {} elapsed: {} ms", compressed_desc, path_display, encrypt_duration.as_millis());
|
||||
debugging!("Inner decrypt file{}: {} elapsed: {} ms",
|
||||
iff!(meta.compress, " [compressed]", ""),
|
||||
path_display,
|
||||
encrypt_duration.as_millis()
|
||||
);
|
||||
|
||||
if cmd_decrypt.remove_file {
|
||||
util::remove_file_with_msg(path);
|
||||
|
||||
Reference in New Issue
Block a user