refactor: replace with_context calls with context calls

This commit is contained in:
2026-05-10 18:13:47 +02:00
parent 3ea0de1cdb
commit 20c0a919c5
+3 -2
View File
@@ -100,12 +100,13 @@ fn main() -> anyhow::Result<()> {
let password = rpassword::prompt_password(
"Enter password for encrypting found keys (leave empty for no encryption): ",
)
.with_context(|| "Failed to prompt password")?;
.context("Failed to prompt password")?;
if password.is_empty() {
None
} else {
let password_retype = rpassword::prompt_password("Retype password: ")
.with_context(|| "Failed to prompt password retype")?;
.context("Failed to prompt password retype")?;
if password_retype == password {
Some(password.into())
} else {