Fix tests, move rpassword usage to utils.rs to implement something different for wasm.

This commit is contained in:
Oleksandr Kozachuk
2023-01-01 19:04:56 +01:00
parent eced302282
commit 7563645518
5 changed files with 25 additions and 23 deletions
+5 -1
View File
@@ -10,7 +10,7 @@ pub mod date {
use chrono::naive::NaiveDate;
use chrono::Local;
#[derive(PartialEq, Debug, Clone)]
#[derive(PartialEq, Debug, Clone, Copy)]
pub struct Date {
date: NaiveDate
}
@@ -107,6 +107,10 @@ pub mod editor {
}
}
}
pub fn password(prompt: impl ToString) -> std::io::Result<String> {
rpassword::prompt_password(prompt)
}
}
pub fn call_cmd_with_input(cmd: &str, args: &Vec<String>, input: &str) -> io::Result<String> {