From a8688736d98077f3da8c9d2dded6f571c4587915 Mon Sep 17 00:00:00 2001 From: taichong Date: Thu, 4 Jul 2024 00:18:30 +0800 Subject: [PATCH] fix check --- cli/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 14535e3e..48344d17 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -262,7 +262,7 @@ pub async fn main() -> Result<()> { if tls.to_lowercase() == "true" { eprintln!("warning: --tls is ignored when --dsn is set") } - } else if config.connection.args.get("tls").is_none() { + } else if !config.connection.args.contains_key("tls") { // args.tls is none and not config in config.toml eprintln!("warning: --tls is ignored when --dsn is set"); } @@ -314,7 +314,7 @@ pub async fn main() -> Result<()> { .args .insert("sslmode".to_string(), "disable".to_string()); } - } else if conn_args.args.get("tls").is_none() { + } else if !conn_args.args.contains_key("tls") { // means arg.tls is none and not config in config.toml conn_args .args