Refactor read_password function to take just the name as argument, not the prompt.

This commit is contained in:
Oleksandr Kozachuk
2023-01-07 13:40:00 +01:00
parent 54c2c0e5a1
commit 122aeaf75b
4 changed files with 9 additions and 13 deletions
+2 -2
View File
@@ -139,8 +139,8 @@ pub mod editor {
}
}
pub fn password(prompt: impl ToString) -> std::io::Result<String> {
rpassword::prompt_password(prompt)
pub fn password(pwname: String) -> std::io::Result<String> {
rpassword::prompt_password(format!("Password for {}: ", pwname))
}
}