From b7bc1f16ad4047e6eeb1d48c3d1066b69b0b5d3a Mon Sep 17 00:00:00 2001 From: DTB Date: Mon, 8 Jul 2024 14:34:42 -0600 Subject: [PATCH] swab(1): use the getopt error message --- src/swab.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/swab.rs b/src/swab.rs index 8573cea..dd5b464 100644 --- a/src/swab.rs +++ b/src/swab.rs @@ -52,7 +52,7 @@ fn main() -> ExitCode { let mut optind: usize = 1; // argv[0] let mut wordsize: usize = 2; // Equivalent to dd(1p). - while let Some(opt) = argv.getopt(":w:") { + while let Some(opt) = argv.getopt("w:") { match opt.opt() { Ok("w") => { match opt.arg().unwrap().parse::() {