mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
updated dependencies
This commit is contained in:
@@ -398,7 +398,7 @@ impl ConfigClient {
|
||||
/// Returns: (host, username)
|
||||
fn get_ssh_tokens(host_key: &str) -> (String, String) {
|
||||
let tokens: Vec<&str> = host_key.split('@').collect();
|
||||
assert_eq!(tokens.len(), 2);
|
||||
assert!(tokens.len() >= 2);
|
||||
(String::from(tokens[1]), String::from(tokens[0]))
|
||||
}
|
||||
|
||||
|
||||
@@ -30,9 +30,7 @@ pub fn init(level: LogLevel) -> Result<(), String> {
|
||||
let file: File = open_file(log_file_path.as_path(), true, true, false)
|
||||
.map_err(|e| format!("Failed to open file {}: {}", log_file_path.display(), e))?;
|
||||
// Prepare log config
|
||||
let config = ConfigBuilder::new()
|
||||
.set_time_format_str("%Y-%m-%dT%H:%M:%S%z")
|
||||
.build();
|
||||
let config = ConfigBuilder::new().set_time_format_rfc3339().build();
|
||||
// Make logger
|
||||
WriteLogger::init(level, config, file)
|
||||
.map_err(|e| format!("Failed to initialize logger: {}", e))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/// Read a secret from tty with customisable prompt
|
||||
pub fn read_secret_from_tty(prompt: &str) -> std::io::Result<Option<String>> {
|
||||
match rpassword::read_password_from_tty(Some(prompt)) {
|
||||
match rpassword::prompt_password(prompt) {
|
||||
Ok(p) if p.is_empty() => Ok(None),
|
||||
Ok(p) => Ok(Some(p)),
|
||||
Err(err) => Err(err),
|
||||
|
||||
Reference in New Issue
Block a user