From 89efeec505b7eb687c83275a76d0cb128e7e1580 Mon Sep 17 00:00:00 2001 From: primardj Date: Fri, 5 Apr 2024 23:46:50 +0100 Subject: [PATCH] if flag not known, print a proper message jaaj --- 01_phase_rust_src/sv/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/01_phase_rust_src/sv/src/main.rs b/01_phase_rust_src/sv/src/main.rs index eeac18b..8f722c3 100644 --- a/01_phase_rust_src/sv/src/main.rs +++ b/01_phase_rust_src/sv/src/main.rs @@ -55,6 +55,10 @@ fn main() { i += 1; } else { + if val.len() == 2 { + println!("sv: illegal option -- {}", val.chars().nth(1).unwrap() ); + // TODO: thread NOT pannic if it is not an ASCII character. + } parser::misc::usage(); exit(100); }