From 7d5bffce9e7cf76fe7d46c09fcc57267921a017e Mon Sep 17 00:00:00 2001 From: 0xf8 <0xf8.dev@proton.me> Date: Mon, 29 May 2023 23:50:20 -0400 Subject: [PATCH] properly show error message when entering invalid user@host --- src/main.rs | 1 + src/platform.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index df9abcc..b4a35ab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,6 +31,7 @@ fn main() -> Result<()> { let mut config: ConfigManager = ConfigManager::new(config_root, search_path)?; let backend = TermionBackend::new(io::stdout().into_alternate_screen()?); +// let backend = TermionBackend::new(io::stdout()); // used for debugging let mut term = Terminal::new(backend)?; loop { diff --git a/src/platform.rs b/src/platform.rs index 3a342a3..825cdfb 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -86,7 +86,7 @@ Host {host} let split: Vec = split.map(|a| a.to_string()).collect(); if split.len() < 2 { - bail!("Incorrect user@host given. Example: paul@example.com:34; @[:port]"); + println!("Incorrect user@host given. Example: paul@example.com:34; @[:port]"); } else { break split }