From e59907d81ec2ba6d5cb52336ea29c59ed99caa13 Mon Sep 17 00:00:00 2001 From: Valerie Wolfe Date: Fri, 12 Jul 2024 14:17:58 -0400 Subject: [PATCH] dos-var: corrected error message --- dos-var/src/error.rs | 4 ++-- dos-var/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dos-var/src/error.rs b/dos-var/src/error.rs index a7fa008..6ca612b 100644 --- a/dos-var/src/error.rs +++ b/dos-var/src/error.rs @@ -6,8 +6,8 @@ pub fn not_found(target: &String) { } -pub fn arg_count() { - eprintln!("dos-var: expects one argument"); +pub fn missing_arg() { + eprintln!("dos-var: no argument found"); exit(2); } diff --git a/dos-var/src/main.rs b/dos-var/src/main.rs index 4e74bd5..0a559c7 100644 --- a/dos-var/src/main.rs +++ b/dos-var/src/main.rs @@ -35,6 +35,6 @@ pub fn main() { println!("{path}"); } } - } + } else { error::missing_arg(); } }