From 6b9d13b8a0dc6a8a072148954e0e222a085c57d8 Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 28 Jul 2024 18:27:22 -0600 Subject: [PATCH] fop(1): better opt matching --- src/fop.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fop.rs b/src/fop.rs index 06024d5..bbca85e 100644 --- a/src/fop.rs +++ b/src/fop.rs @@ -42,12 +42,12 @@ fn main() { while let Some(opt) = argv.getopt("d:") { match opt.opt() { - Ok(_) => { + Ok("d") => { /* delimiter */ d = opt.arg().unwrap(); optind = opt.ind(); }, - Err(_) => { + _ => { eprintln!("{}", usage); exit(EX_USAGE); }