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 comment"), to_yes_or_no(&meta.encrypted_comment)));
|
||||||
infos.push(format!("{}: {}", header("Encrypted meta"), to_yes_or_no(&meta.encrypted_meta)));
|
infos.push(format!("{}: {}", header("Encrypted meta"), to_yes_or_no(&meta.encrypted_meta)));
|
||||||
let encryption_algorithm = if let Some(encryption_algorithm) = &meta.encryption_algorithm {
|
let encryption_algorithm = meta.encryption_algorithm.clone()
|
||||||
encryption_algorithm.to_string()
|
.unwrap_or_else(|| format!("{} (default)", TINY_ENC_AES_GCM));
|
||||||
} else {
|
|
||||||
format!("{} (default)", TINY_ENC_AES_GCM)
|
|
||||||
};
|
|
||||||
infos.push(format!("{}: {}", header("Encryption algorithm"), encryption_algorithm));
|
infos.push(format!("{}: {}", header("Encryption algorithm"), encryption_algorithm));
|
||||||
|
|
||||||
success!("{}", infos.join("\n"));
|
success!("{}", infos.join("\n"));
|
||||||
|
|||||||
Reference in New Issue
Block a user