diff --git a/src/commands/link.rs b/src/commands/link.rs index 50a6dce6..0f196374 100644 --- a/src/commands/link.rs +++ b/src/commands/link.rs @@ -101,11 +101,11 @@ pub fn check_userids(config: &Config, cert: &Cert, self_signed: bool, if known_userids.iter().any(|known_userid| known_userid == &userid) { results.push(userid); } else { - let err = anyhow::anyhow!(format!( + let err = anyhow::anyhow!( "{:?} does not match any self-signed User IDs. If you want \ to use a User ID that is not endorsed by the key's owner, \ use \"--petname\"", - String::from_utf8_lossy(userid.value()))); + String::from_utf8_lossy(userid.value())); print_error_chain(&err); if error.is_none() { error = Some(err); @@ -136,11 +136,11 @@ pub fn check_userids(config: &Config, cert: &Cert, self_signed: bool, .collect::>(); if matches.is_empty() { - let err = anyhow::anyhow!(format!( + let err = anyhow::anyhow!( "{:?} does not match any valid, self-signed email \ addresses. If you want to use an email address that \ is not endorsed by the key's owner, use \"--petname\"", - email)); + email); print_error_chain(&err); if error.is_none() { error = Some(err); diff --git a/src/sq.rs b/src/sq.rs index 87d2cec8..4e633b12 100644 --- a/src/sq.rs +++ b/src/sq.rs @@ -391,12 +391,12 @@ impl<'store> Config<'store> { PathBuf::from(pep_cert_store) } Ok(false) => { - return Err(anyhow::anyhow!(format!( - "{:?} does not exist", pep_cert_store))); + return Err(anyhow::anyhow!( + "{:?} does not exist", pep_cert_store)); } Err(err) => { - return Err(anyhow::anyhow!(format!( - "Accessing {:?}: {}", pep_cert_store, err))); + return Err(anyhow::anyhow!( + "Accessing {:?}: {}", pep_cert_store, err)); } } };