feat: optimize info
This commit is contained in:
@@ -121,11 +121,8 @@ pub fn info_single(path: &PathBuf, cmd_info: &CmdInfo, config: &Option<TinyEncry
|
||||
}
|
||||
infos.push(format!("{}: {}", header("Encrypted comment"), to_yes_or_no(&meta.encrypted_comment)));
|
||||
infos.push(format!("{}: {}", header("Encrypted meta"), to_yes_or_no(&meta.encrypted_meta)));
|
||||
let encryption_algorithm = if let Some(encryption_algorithm) = &meta.encryption_algorithm {
|
||||
encryption_algorithm.to_string()
|
||||
} else {
|
||||
format!("{} (default)", TINY_ENC_AES_GCM)
|
||||
};
|
||||
let encryption_algorithm = meta.encryption_algorithm.clone()
|
||||
.unwrap_or_else(|| format!("{} (default)", TINY_ENC_AES_GCM));
|
||||
infos.push(format!("{}: {}", header("Encryption algorithm"), encryption_algorithm));
|
||||
|
||||
success!("{}", infos.join("\n"));
|
||||
|
||||
Reference in New Issue
Block a user