feat: fix clippy

This commit is contained in:
2023-10-13 21:41:47 +08:00
parent c9774d7542
commit d1cc03cf2f
2 changed files with 10 additions and 3 deletions

View File

@@ -69,7 +69,7 @@ pub fn info_single(path: &PathBuf, cmd_info: &CmdInfo) -> XResult<()> {
format_human2(Duration::from_millis(now_millis - meta.created))
));
meta.envelops.as_ref().map(|envelops|
if let Some(envelops) = meta.envelops.as_ref() {
envelops.iter().enumerate().for_each(|(i, envelop)| {
let kid = iff!(envelop.kid.is_empty(), "".into(), format!(", Kid: {}", envelop.kid));
let desc = envelop.desc.as_ref().map(|desc| format!(", Desc: {}", desc)).unwrap_or_else(|| "".to_string());
@@ -80,7 +80,8 @@ pub fn info_single(path: &PathBuf, cmd_info: &CmdInfo) -> XResult<()> {
desc
));
})
);
}
if let Some(fingerprint) = meta.pgp_fingerprint {
infos.push(format!("{}: {}", header("PGP fingerprint"), fingerprint));
}